<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0035)https://www.tsign.cn/user/sign!page -->
<html slick-uniqueid="3"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>e 签宝</title>
		<meta name="renderer" content="webkit"> 
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<link rel="Shortcut Icon" href="https://www.tsign.cn/images_2.0/favicon.ico" type="image/x-icon">
		<meta name="Keywords" content="e签宝、签名、签章、印章、签署、签字、盖章、电子合同、电子签名、数字签名、电子文档、互联网签名、电子签章、电子印章、CA、电子认证">
<!-- 		<meta name="viewport" content="width=device-width, initial-scale=1"> -->
		<link rel="stylesheet" type="text/css" href="./e 签宝_files/index.css">
		<link rel="stylesheet" type="text/css" href="./e 签宝_files/master.css">
		<link rel="stylesheet" type="text/css" href="./e 签宝_files/style.css">
		<link rel="stylesheet" type="text/css" href="./e 签宝_files/alert.css">
		<script type="text/javascript" src="./e 签宝_files/jquery-1.5.1.js.下载"></script>
		<script type="text/javascript" src="./e 签宝_files/gesture.js.下载"></script>
		
		
		<!--[if lt IE 9]><script type="text/javascript">$(function() { window.location.href = "../login/login!page?skip=error";});</script><![endif]-->
		
		
    <meta name="decorator" content="sign">
    <script type="text/javascript" src="./e 签宝_files/jquery-2.1.1.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/template.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/pub.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/sign-pack.js.下载"></script><script type="text/javascript" src="./e 签宝_files/jquery.lazyload.js.下载"></script><script type="text/javascript" src="./e 签宝_files/excanvas.js.下载"></script><script type="text/javascript" src="./e 签宝_files/html5.js.下载"></script><script type="text/javascript" src="./e 签宝_files/jquery-ui.min.js.下载"></script><script type="text/javascript" src="./e 签宝_files/jquery.signature.js.下载"></script><script type="text/javascript" src="./e 签宝_files/jquery.ui.touch-punch.min.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/contract.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/sign.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/ukey-sign.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/md5.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/alert.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/doc.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/jquery.qrcode.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/qrcode.js.下载"></script>
    <link rel="stylesheet" type="text/css" href="./e 签宝_files/shake.css">
    <link rel="stylesheet" type="text/css" href="./e 签宝_files/docSign.css">
    <script type="text/javascript" src="./e 签宝_files/xhr.js.下载"></script>
    <script type="text/javascript" src="./e 签宝_files/Ukey.js.下载"></script>
    <script src="sign.js" type="text/javascript" charset="utf-8"></script>
    <!--弹出框-->
    <script src="./e 签宝_files/3rd%2Fbootstrap%2F3.3.5%2Fjs%2Fbootstrap.min.js.下载"></script>
    <link rel="stylesheet" href="./e 签宝_files/3rd%2Fbootstrap%2F3.3.5%2Fcss%2Fbootstrap.min.css">
    <script type="text/javascript" src="./e 签宝_files/bootstrap-dialog.js.下载"></script>
    <link rel="stylesheet" href="./e 签宝_files/bootstrap-dialog.css">
    <style type="text/css">
        a:focus, a:hover{
            color: #fff;
            text-decoration: initial;
        }
        .msgContent {
            padding: 10px 50px;
            font-size: 15px;
            text-indent: 21pt;
            text-align: left;
            letter-spacing: 1px;
        }

        .IEreturn {
            background: none repeat scroll 0 0 #e74031;
            border-radius: 2px;
            color: #fff;
            display: block;
            font-size: 16px;
            height: 32px;
            line-height: 32px;
            text-align: center;
            width: 80px;
            margin: 0 auto;
        }

        .center {
            background: #fff;
            border: 1px solid #e74031;
            width: 370px;
            height: 140px;
            position: absolute;
            margin: -50px -185px;
            border-radius: 2px;
        }

        .hi {
            display: none;
        }

        .ukeyline-selected {
            border: 1px solid;
            background: #fefaed;
        }

        .ukeyline-move {
            background: #f8f9fb;
        }
        .ukeyline:hover{
            background: #f8f9fb;
        }

        .ukeyline-moveout {
            background: #fff;
        }

        ul.nav_li_001 li {
            width: 100px
        }
        /*修改样式*/
        .content_0u .tips_01{
            background: #e74031;
            color:#fff;
        }
        #select-staple{
            padding: 0px;
            border-radius: 5px 5px 5px 5px;
            position: absolute;
            top: 20%;
            margin-left: 35%;
        }
        #select-staple label{
            font-size: 15px;
            margin-left: 10px;
        }
        #select-staple .btn_use_sign{
            width: 70px;
            display: inline-block;
            margin: 10px;
        }
        #select-staple .staple-close{
            background: #ddd;
            color: #808080;
        }
        .close{
            /*margin-top: -10px;*/
            font-weight: normal;
            opacity:1;
            float: none;
        }
        .close:hover{
            opacity:1;
            float: none;
        }
        .history-box,.grant-box{
            display: inline-block;width: 140px;height:140px;position: relative;vertical-align: middle;
        }
        .default-box{
            display:inline-block;height: 170px;width:170px;position: relative;
        }
        .grant-box>img,.history-box>img,#defaultSeal{
            max-width: 100%;
            max-height: 100%;
            position: absolute;
            top:50%;
            left:50%

        }
    </style>
    <script type="text/javascript">
        var MAX_SEAL_SIZE = 30;
        $(function () {
            sessionStorage.setItem('6855614', "");
            if (false) {
                showUrlMust("您需要完成实名认证才能继续签署", "../user/account!page?skip=identify");
                return;
            }
            if(!$.checkUkeyByIE()){
                reutrn
            }
            if (sessionStorage.signType == 'me') {
                $("#saveBtn").hide();
                sessionStorage.signType = '';
            }
            createPage = function (pageArray) {

                var signdocName = '6855614';
                var pageList = pageArray.split("-");
                var startPage = parseInt(pageList[0]);
                var finishPage = parseInt(pageList[1]);
                for (var i = startPage; i <= finishPage; i = i + 1) {
                    if ($("#centerPage_" + signdocName + "_" + i).length == 0) {
                        $("#centerWar").append("<a id='centerPage_" + signdocName + "_" + i + "'></a>"
                                + "<div id='page_" + signdocName + "_" + i + "' name='rightPage_" + signdocName + "_a_" + i + "' class='wd page' style='' onmouseup='contractClick(event,this.id)'   ondragover='allowDrop(event)' ondrop='drop(event,this," + i + "," + signdocName + "," + signdocName + ")'></div>"
                                + "<div align='center' class='c_page_no'>" + i + "</div>");
                        var o = "centerPage_" + signdocName + "_" + i;
                        $("#fileScroll_1").append('<a class="a_cls" id="rightPage_' + signdocName + '_a_' + i + '"></a>'
                                + '<div class="ym_sale_001 wd rightPage" id="rightPage_' + signdocName + '_' + i + '">'
                                + '<a class="a_cls" href="javascript:document.getElementById(\'' + o + '\').scrollIntoView();" onclick="javascript:setClass(\'' + signdocName + '_' + i + '\');">'
                                + '<img id="' + signdocName + '_img_' + i + '" class="smimage" width="100%" src="" style="display: inline;" />'
                                + '<div style="position: relative">'
                                + '<div class="tits">' + i + '</div>'
                                + '</div>'
                                + '</a>'
                                + '</div>');
                    }
                }
                getFiveImgUrl('6855614', signdocName, pageList);
            }
            var grantSealFlag = true;
            getGrantSeal = function () {
                var postData = "startNum=" + 0 + "&num=" + 4 + "&hasAudit=1&edit=" + (new Date()).valueOf();
                $.ajax({
                    url: "seal!getGrantSeal.xml",
                    type: "POST",
                    data: postData,
                    dataType: "xml",
                    timeout: 300000,
                    error: function () {
                        closeAlert();
                    },
                    success: function (data) {
                        closeAlert();
                        var result = $(data).find("result >resultMsg").text();
                        if (result == null || result == "") {
                            showAlert("系统出错，请稍后重试");
                            return;
                        }
                        var jsonData = JSON.parse(result);
                        var errCode = jsonData["errCode"];
                        if (errCode > 0) {
                            $("ul.nav_li_001 li").eq(2).hide();
                            if (2 == 2)
                            {
                                $("ul.nav_li_001 li").css("width", "170px");
                            }
                            if (2 == 1)
                            {
                                $("ul.nav_li_001 li").css("width", "130px");
                            }
                        }
                    }
                })
            }
            getGrantSeal();
            createPage("1-1");
            if (2 == 2
            )
            {
                $("ul.nav_li_001 li").css("width", "130px");
            }
            showFancybox = function (obj) {
                closeInput();
                showFancyboxBlockUI();
                $("#" + obj).show();
            }

            closeInput = function () {
                $(".content_0u").hide();
                closeAlert();
            }
            changeRand = function () {
                var url = "../regist/rand!createRand?" + 'edit=' + (new Date()).valueOf();
                $("#randImg").attr("src", url);
            };
            $("body").keydown(function () {
                if (event.keyCode == "13") {
                    if ($("#inputPassword").css("display") != "none") {
                        sign();
                    }
                }
            });

        });


        getSeals = function () {
            var postData = "isDefault=" + 0 + "&edit=" + (new Date()).valueOf();
            $.ajax({
                url: "seal!getSeals.xml",
                type: "post",
                data: postData,
                dataType: "xml",
                timeout: 300000,
                success: function (data) {
                    var result = $(data).find("result >resultMsg").text();
                    if (result == null || result == "") {
                        return;
                    }
                    var jsonData = JSON.parse(result);
                    var errCode = jsonData["errCode"];
                    if (errCode > 0) {
                    } else {
                        var items = jsonData["msg"];
                        var count = 0;
                        $(items).each(function (index) {
                            if (items[index]["status"] == 1) {
                                count++;
                            }
                        });
                        var onlineCount = parseInt($("#sealCount").val());
                        if (onlineCount + count >= 100) {
                            $(".nav_li_001 li").eq(0).css("width", "260px");
                            $(".nav_li_001 li").eq(1).css("width", "260px");
                            $(".nav_li_001 li").eq(2).hide();
                            $(".nav_li_001 li").eq(3).hide();
                        }
                    }
                }
            });
        }

        var CODE = "";
        var TIMER = "";
        var TIMEOUT = 150;
        var HOST = 'https://www.tsign.cn:443/draw.html?code=';
        createCode = function () {
            var postData = "edit=" + (new Date()).valueOf();
            $.ajax({
                url: "seal!createSealKey.xml",
                type: "post",
                data: postData,
                dataType: "xml",
                timeout: 300000,
                success: function (data) {
                    var result = $(data).find("result >resultMsg").text();
                    if (result == null || result == "") {
                        return;
                    }

                    $("#qrcodeCanvas").html("");
                    CODE = result;

                    jQuery('#qrcodeCanvas').qrcode({
                        text: HOST + CODE
                    });
                }
            });
        }
          refreshCode = function () {
            createCode();
            startListener();
        }
        timeOutCode = function () {
            showAlert("由于长时间未签名，二维码已过期，请重新生成二维码或切换其他签名方式");
            $("#qrcodeCanvas").html("");
            jQuery('#qrcodeCanvas').qrcode({
                text: HOST + "timeout"
            });
            clearInterval(TIMER);
        }

        startListener = function () {
            if (TIMER != "" || TIMER != undefined) {
                clearInterval(TIMER);
            }
            TIMEOUT = 150;
            setTimer = function () {
                if (TIMEOUT-- < 0) {
// 								clearInterval(TIMER);
// 								TIMER = "";
                    timeOutCode();
                    return;
                }
                ;
                var postData = "code=" + CODE + "&edit=" + (new Date()).toString();
                $.ajax({
                    url: "seal!getMobileSeal.xml",
                    type: "post",
                    data: postData,
                    dataType: "xml",
                    timeout: 300000,
                    success: function (data) {
                        var result = $(data).find("result >resultMsg").text();
                        if (result == null || result == "") {
                            return;
                        }
                        var jsonData = JSON.parse(result);
                        var errCode = jsonData["errCode"];
                        if (errCode > 0) {
                            var errShow = new Boolean(jsonData["errShow"]);
                            if (errShow == true) {
                                if ($(".signFlag").length <= 0) {
                                    return;
                                }
                                showAlert(jsonData["msg"]);

                            } else {
                                showAlert("系统出错，请稍后重试");
                            }
                            return;
                        } else {
                            clearInterval(TIMER);
                            TIMER = "";
                            $("#cordova").attr('src', jsonData["img1Url"]);
                            $("#cordova").attr('key', jsonData["img1"]);
                            $("#onlineSeal").attr("key", jsonData["img1"]);
                            $("#cordova").attr('X', 95);
                            $("#cordova").attr('Y', 95);
                            defaultSignAjax('#cordova');
                        }
                    }
                });
            }
            TIMER = setInterval(setTimer, 2000);
        }

        getSeals();
    </script>
    <script>
        $(function(){
            stapleInitActionListener = function(){
                function closeClick(){
                    $("#select-staple").hide();
                    $("#" + $("#onlineSeal").attr("objId")).remove();
                    if ($(".signFlag[signtype=1]").length < 10) {
                        $("#qmImg").removeClass("lock-option");
                    }
                    closeAlert();
                }
                function selectClick(){
                    var type = $(".label-click").attr("id");
                    if(type == "all-staple"){
                        $("#" + $("#onlineSeal").attr("objId")).attr("posPage","0");
                    }else{
                        $("#" + $("#onlineSeal").attr("objId")).attr("posPage",$("#start-staple").val() +"-"+ $("#end-staple").val());
                    }
                    $("#select-staple").hide();
                    closeAlert();
                    selectSignType('configID');
                    /* $("#select-staple").fadeOut(800,function(){
                     selectSignType('configID');
                     });*/
                }
                /*
                 $("#select-staple label[for='specific-staple'] input").attr("max",$("#currentPageNum").val());
                 */

                $(".selectRadio").bind("click",function(){
                    var before = $(this).attr("class").indexOf("label-click") > -1 ? "label-click" : "label-unclick";
                    if(before == "label-unclick"){
                        $(".label-click").removeClass("label-click");
                        $(".selectRadio").addClass("label-unclick");
                        $(this).removeClass(before);
                        $(this).addClass("label-click");
                        if($(this).attr("id") == "specific-staple"){
                            $(".range").removeAttr("disabled");
                        }else{
                            $(".range").attr("disabled","disabled");
                        }
                    }

                })
                $("#select-staple .face_close").bind("click",closeClick);
                $("#select-staple .staple-close").bind("click",closeClick);
                $(".range").bind("blur",function(){
                    if(parseInt($(this).val()) > parseInt($(this).attr("max")) || parseInt($(this).val()) < parseInt($(this).attr("min"))){
                        $(this).val($(this).attr("default-data"));
                    }
                })
                $(".select-range").bind("click",selectClick);
            }
            stapleInitActionListener();
        })
    </script>

		<style type="text/css">
		.signlogo{
					width:100px;		
					height:40px;
					float:right;
					background: url('../images_2.0/fasong_02.png?v=3');
					cursor:pointer;
		}
		.organlogo{
			  float: left;
			  padding: 5px 5px;
			  border-right: 3px solid #fff;
			  margin-right: 5px
		}
		</style>
		<script type="text/javascript">
			$(function(){
				$("input:not(:text,:password)").css("cursor","pointer");
				$(".random").css("cursor","pointer");
				$("a").css("cursor","pointer");
				
			});
			goHome = function(){
				window.location.href="../user/account!page?skip=home";
			}
		</script>
	</head>
	<body>
		<!--头部-->
		<div class="sendHead" style="position: fixed;">
			<div class="wrap">

				
					
					
					<a href="https://www.tsign.cn/user/account!page?skip=home" style="cursor: pointer;"><img src="./e 签宝_files/fasong_02.png" class="fl"></a>
						<div class="f14 white pt15 fl">签署一份文件<span id="user_email">（签署人：zjjr56@qq.com）</span></div>
					
					
				
				<!-- <div class="fr f14 pt15 whitelink">
					<a>帮助</a>
				</div> -->
				<div class="cl"></div>
			</div>
		</div>

		
<div id="background" style="display: none; width: 1920px; height: 974px;"></div>
<div class="upload_wait2" id="upload_wait2" style="display: none;">
    <img src="./e 签宝_files/d10eb9a8-1a81-4f1b-8627-4748503dd6ca">
</div>
<!--*******内容开始*******-->
<div class="senFileNext">
    <div class="boxmain">
        <img id="qianmingchu" src="./e 签宝_files/qianmingchu.png" alt="" style="display: none; left: 890px; top: 490px; width: 64px; height: 64px;">
        <img id="riqi" src="./e 签宝_files/riqi.png" alt="" style="display: none; left: 910px; top: 90px;">

        <div class="left" id="left" style="height: 403px;">
            <input type="hidden" id="hasCheckGZ" value="0" style="cursor: pointer;">
            <input type="hidden" id="userType" value="1" style="cursor: pointer;">
            <input type="hidden" id="signType" value="1" style="cursor: pointer;">
            <input type="hidden" id="signID" value="1429492343253M9ZB2" name="signID" style="cursor: pointer;">
            <input type="hidden" id="signImgSrc" value="" style="cursor: pointer;">
            <input type="hidden" id="configID" value="AH99WNAY" style="cursor: pointer;">
            <input type="hidden" id="width" value="159" style="cursor: pointer;">
            <input type="hidden" id="height" value="159" style="cursor: pointer;">
            <input type="hidden" id="type" value="2" style="cursor: pointer;">
            <input type="hidden" id="pdfWidth" value="595.32" style="cursor: pointer;">
            <input type="hidden" id="pdfHeight" value="841.92" style="cursor: pointer;">
            <input type="hidden" id="nextType" value="5" style="cursor: pointer;">
            <input type="hidden" id="payType" value="0" style="cursor: pointer;">
            <input type="hidden" id="sealway" value="1" style="cursor: pointer;">
            <input type="hidden" id="Template" value="star" style="cursor: pointer;">
            <input type="hidden" id="currentSignType" value="1" style="cursor: pointer;">
            <input type="hidden" id="onlineSeal" value="" objid="SILJFDN1" sealid="" templatename="star" sealway="1" typename="" rune="" key="7358348/seal_820e8247-552e-4861-a6e6-bad92877305e" signtype="1" style="cursor: pointer;">
            <input type="hidden" id="sealCount" value="2" style="cursor: pointer;">
            <input type="hidden" id="onlineChange" value="" style="cursor: pointer;">
            <input type="hidden" id="currentPageNum" value="11" style="cursor: pointer;">
            <div id="op_user">
                <div class="message">
                    <h3>签章指南</h3>
                    <p>选择签章方式，通过单击或拖动的方式选择签
                        章位置；<br>
                        双击印章可以重新选择印章；<br>
                        单击印章，点击右上角“X”可以删除印章。<br>
                    </p>
                </div>
                <div class="options">
                    <div class="option" id="qmImg" ondragstart="javascript:return false;">
                        <img src="./e 签宝_files/sign-icon.png">
                        <div>
                            <h3>单页签章</h3>
                            <p>一次只能选择在一个页面中签章，可重复操作
                                签署多个印章</p>
                        </div>
                    </div>
                    <div class="option" id="stapleImg" ondragstart="javascript:return false;">
                        <img src="./e 签宝_files/sign-icon.png">
                        <div>
                            <h3>签署骑缝章</h3>
                            <p>在文档右边的交接处加盖印章</p>
                        </div>
                    </div>
                    
                </div>
                
            </div>
        </div>
        <div class="main" id="centerWar" style="height: 403px;">

            <a id="centerPage_6855614_1" style="cursor: pointer;"></a>

            <div id="page_6855614_1" name="rightPage_6855614_a_1" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_1?Expires=1495765542&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=rhsll28YCIldivIYAvKe0MhAW9k%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,1,&#39;6855614&#39;,&#39;&#39;)">
            </div>
            <div align="center" class="c_page_no">1</div>
	        <a id="centerPage_6855614_2"></a>
	        <div id="page_6855614_2" name="rightPage_6855614_a_2" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_2?Expires=1495765543&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=jOb3X%2FZgv87430Vb0oyd9PvHek0%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,2,6855614,6855614)"></div><div align="center" class="c_page_no">2</div><a id="centerPage_6855614_3"></a><div id="page_6855614_3" name="rightPage_6855614_a_3" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_3?Expires=1495765543&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=im8XOIEDwXvxeNpz5xrDVmyE3Q4%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,3,6855614,6855614)"></div><div align="center" class="c_page_no">3</div>
	        <a id="centerPage_6855614_4"></a><div id="page_6855614_4" name="rightPage_6855614_a_4" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_4?Expires=1495765543&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=BhTQtdfXfJq70s63N99Huh3ruqY%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,4,6855614,6855614)"></div><div align="center" class="c_page_no">4</div><a id="centerPage_6855614_5"></a><div id="page_6855614_5" name="rightPage_6855614_a_5" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_5?Expires=1495765543&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=BnnypSYhlp1jglZtEQ%2BaCk4w%2Fjg%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,5,6855614,6855614)"></div><div align="center" class="c_page_no">5</div><a id="centerPage_6855614_6"></a><div id="page_6855614_6" name="rightPage_6855614_a_6" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_6?Expires=1495765543&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=1ZnxTMWrKq7KuKh7VBKoH7QygKI%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,6,6855614,6855614)"></div><div align="center" class="c_page_no">6</div><a id="centerPage_6855614_7"></a><div id="page_6855614_7" name="rightPage_6855614_a_7" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_7?Expires=1495765597&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=hU1JFD9lT03KjcIGZcDSI0ORalY%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,7,6855614,6855614)"></div><div align="center" class="c_page_no">7</div><a id="centerPage_6855614_8"></a><div id="page_6855614_8" name="rightPage_6855614_a_8" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_8?Expires=1495765597&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=stUGnlnMmVT9jmqNkxdlJCOEy6g%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,8,6855614,6855614)"></div><div align="center" class="c_page_no">8</div><a id="centerPage_6855614_9"></a><div id="page_6855614_9" name="rightPage_6855614_a_9" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_9?Expires=1495765597&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=5IIro2T5BMTUTUEzQ0mRqZFrNvs%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,9,6855614,6855614)"></div><div align="center" class="c_page_no">9</div><a id="centerPage_6855614_10"></a><div id="page_6855614_10" name="rightPage_6855614_a_10" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_10?Expires=1495765597&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=pH2r9qZ3ZaX0IJrSTtk1ZI%2BUvfg%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,10,6855614,6855614)"></div><div align="center" class="c_page_no">10</div><a id="centerPage_6855614_11"></a><div id="page_6855614_11" name="rightPage_6855614_a_11" class="wd page" style="height: 1619.71px; width: 1094.4px; background: url(&quot;https://esign-oss-release.oss-cn-hangzhou.aliyuncs.com/docimagetmp/doc_zjjr56%40qq.com_6855614_11?Expires=1495765597&amp;OSSAccessKeyId=FBzUaPMorqiiUAfb&amp;Signature=UreqyLQCMwvRFf71lX1M1KtUiIk%3D&quot;) 0px 0px / 100% 100% no-repeat scroll rgba(0, 0, 0, 0);" onmouseup="contractClick(event,this.id)" ondragover="allowDrop(event)" ondrop="drop(event,this,11,6855614,6855614)"><img id="XUXGT852" src="./e 签宝_files/seal_6d2ffc15-0421-499b-920f-fc53fc870d30" class="signFlag" style="left: 253px; top: 689px; width: 212px; height: 212px; position: absolute;" ondblclick="selectSignType(&#39;XUXGT852&#39;)" hasdrap="1" onclick="showDeleteDiv(&#39;XUXGT852&#39;)" onmouseout="pageOnmouseout(&#39;XUXGT852&#39;)" draggable="true" ondragstart="drag(this,event,1)" useremail="zjjr56@qq.com" type="1" typeflag="1" name="configFlag" configid="XUXGT852" signid="1429492343253M9ZB2" docid="6855614" pageno="11" signtype="1" x="0.23578751164958062" y="0.45307356813693217" objwidth="159" objheight="159"><img id="AH99WNAY" src="./e 签宝_files/seal_bb79f497-7f3e-4b6b-98bc-6727e565531a" class="signFlag" style="width: 212px; height: 212px; position: absolute; margin-left: 306px; margin-top: 533px;" ondblclick="selectSignType(&#39;AH99WNAY&#39;)" hasdrap="1" onclick="showDeleteDiv(&#39;AH99WNAY&#39;)" onmouseout="pageOnmouseout(&#39;AH99WNAY&#39;)" draggable="true" ondragstart="drag(this,event,1)" useremail="zjjr56@qq.com" type="1" typeflag="1" name="configFlag" configid="AH99WNAY" signid="1429492343253M9ZB2" docid="6855614" pageno="11" signtype="1" x="0.2851817334575955" y="0.3508887425938117" objwidth="159" objheight="159" flagx="61" flagy="104.21875"></div><div align="center" class="c_page_no">11</div></div>

        <div class="right" style="height: 403px;">
            <div class="pt13 titleB" style="padding-bottom: 5px; padding-top: 5px;">
                <span class="fl f16 b pl10">文件</span> <span class="fr f12 b pr15 ">
							<!-- <a href="#">编辑</a> -->
						</span>

                <div class="cl"></div>
            </div>

            <div class="fileName" onclick="hideOrShow(&#39;rightPage_6855614&#39;);">
                <img src="./e 签宝_files/sanjiao2.png" class="fl pl20 pt18">

                <div class="fl pl10 lh18 pt5">
                    <span id="docName">测试.pdf</span> <br> <span id="pageNum">11</span>页
                </div>
                <div class="cl"></div>
            </div>
            <div class="n rightPageList" id="rightPage_6855614" style="display: block;">
                <div class="fileScroll" id="fileScroll_1" style="height: 323px;">
                <a class="a_cls" id="rightPage_6855614_a_1" style="cursor: pointer;"></a><div class="ym_sale_001 wd rightPage" id="rightPage_6855614_1"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_1&#39;).scrollIntoView();" onclick="setClass(&#39;6855614_1&#39;);" style="cursor: pointer;"><img id="6855614_img_1" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_1" style="display: inline;"><div style="position: relative"><div class="tits">1</div></div></a></div>
                <a class="a_cls" id="rightPage_6855614_a_2"></a><div class="ym_sale_001 wd rightPage" id="rightPage_6855614_2"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_2&#39;).scrollIntoView();" onclick="javascript:setClass(&#39;6855614_2&#39;);"><img id="6855614_img_2" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_2" style="display: inline;"><div style="position: relative"><div class="tits">2</div></div></a></div>
                <a class="a_cls" id="rightPage_6855614_a_3"></a><div class="ym_sale_001 wd rightPage" id="rightPage_6855614_3"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_3&#39;).scrollIntoView();" onclick="javascript:setClass(&#39;6855614_3&#39;);"><img id="6855614_img_3" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_3" style="display: inline;"><div style="position: relative"><div class="tits">3</div></div></a></div><a class="a_cls" id="rightPage_6855614_a_4"></a><div class="ym_sale_001 wd rightPage" id="rightPage_6855614_4"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_4&#39;).scrollIntoView();" onclick="javascript:setClass(&#39;6855614_4&#39;);"><img id="6855614_img_4" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_4" style="display: inline;"><div style="position: relative"><div class="tits">4</div></div></a></div><a class="a_cls" id="rightPage_6855614_a_5"></a><div class="ym_sale_001 wd rightPage" id="rightPage_6855614_5"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_5&#39;).scrollIntoView();" onclick="javascript:setClass(&#39;6855614_5&#39;);"><img id="6855614_img_5" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_5" style="display: inline;"><div style="position: relative"><div class="tits">5</div></div></a></div><a class="a_cls" id="rightPage_6855614_a_6"></a><div class="ym_sale_001 wd rightPage" id="rightPage_6855614_6"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_6&#39;).scrollIntoView();" onclick="javascript:setClass(&#39;6855614_6&#39;);"><img id="6855614_img_6" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_6" style="display: inline;"><div style="position: relative"><div class="tits">6</div></div></a></div><a class="a_cls" id="rightPage_6855614_a_7"></a><div class="ym_sale_001 wd rightPage" id="rightPage_6855614_7"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_7&#39;).scrollIntoView();" onclick="javascript:setClass(&#39;6855614_7&#39;);"><img id="6855614_img_7" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_7" style="display: inline;"><div style="position: relative"><div class="tits">7</div></div></a></div><a class="a_cls" id="rightPage_6855614_a_8"></a><div class="ym_sale_001 wd rightPage" id="rightPage_6855614_8"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_8&#39;).scrollIntoView();" onclick="javascript:setClass(&#39;6855614_8&#39;);"><img id="6855614_img_8" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_8" style="display: inline;"><div style="position: relative"><div class="tits">8</div></div></a></div><a class="a_cls" id="rightPage_6855614_a_9"></a><div class="ym_sale_001 wd rightPage" id="rightPage_6855614_9"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_9&#39;).scrollIntoView();" onclick="javascript:setClass(&#39;6855614_9&#39;);"><img id="6855614_img_9" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_9" style="display: inline;"><div style="position: relative"><div class="tits">9</div></div></a></div><a class="a_cls" id="rightPage_6855614_a_10"></a><div class="ym_sale_001 wd rightPage" id="rightPage_6855614_10"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_10&#39;).scrollIntoView();" onclick="javascript:setClass(&#39;6855614_10&#39;);"><img id="6855614_img_10" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_10" style="display: inline;"><div style="position: relative"><div class="tits">10</div></div></a></div><a class="a_cls" id="rightPage_6855614_a_11"></a><div class="ym_sale_001 wd rightPage on" id="rightPage_6855614_11"><a class="a_cls" href="javascript:document.getElementById(&#39;centerPage_6855614_11&#39;).scrollIntoView();" onclick="javascript:setClass(&#39;6855614_11&#39;);"><img id="6855614_img_11" class="smimage" width="100%" src="./e 签宝_files/doc_zjjr56@qq.com_6855614_11" style="display: inline;"><div style="position: relative"><div class="tits leftIconPosition">11</div></div></a></div></div>
            </div>
        </div>
    </div>

    <input id="flagimage" type="hidden" name="flagimage" value="4" style="cursor: pointer;">
    <input id="sealType" type="hidden" name="sealType" value="model" sealid="0" key="7358348/seal_bb79f497-7f3e-4b6b-98bc-6727e565531a" style="cursor: pointer;">

    <div class="content_0u targetcloudFileList" style="right: 40%; top: 25%; overflow: auto; height: auto; width: 380px;padding-bottom: 30px" id="inputPassword">
        <div class="bgwhite writeNameArea mt7">
            <div class="tips_cont_01">
                <div class="send_cont_li">
                    <div class="mt10 ">
                        <div class="register_creatAccount setIdentityInfo" style="width: 320px;height: auto">
                            <div class="f14 pb10 ac orange4" style="font-size: 16px;padding-left: 50px;">输入<span class="sign-type">签署密码</span></div>
                            <div style="text-align:right;margin-top:10px">
                                <span style="font-size: 14px;color: #3d3d3d;font-weight: bold;" class="sign-type">签署密码：</span>
                                <input type="password" style="width:60%; line-height:22px;" maxlength="200" name="password" id="password">
                            </div>
                            <div style="text-align:right;margin-top:15px;display: none" id="randDiv">
                                <span style="font-size: 14px;color: #3d3d3d;font-weight: bold;">验证码：</span>
                                <input type="text" style="width:33.6%; line-height:22px;" maxlength="200" name="rand" id="rand">
                                <img id="randImg" src="./e 签宝_files/rand!createRand" class="random" onclick="javascript:changeRand()" style="cursor: pointer;">
                            </div>
                            <div style="text-align: center;margin-left: 50px;margin-top:10px">
                                
                            </div>
                            <div style="padding-left: 90px;" class="f14 ac mt20 pl215">
										<span class="fl editeBt2" style="float: left;margin-right:40px">
										<input type="button" value="确定" style="width: 100px; cursor: pointer;" onclick="javascript:sign();">
										</span> <a class="fl ml10 editeBt_cancel" style="float: left; cursor: pointer;" onclick="javascript:closeInput();">取消</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="content_sign" style="left: 698px; top: 258px; width: 524px; height: 460px; display: none;">
        <div class="tips_01 centers_001">确认签名样式
            <span class="face_close"></span>
        </div>
        <div>
            <ul class="nav_li_001">
                <li class="tit_help" id="defaultSignFont" onclick="showSignFont(this,1);" style="width: 170px;">默认签名</li>
                <li class="tit_help" onclick="showSignFont(this,2);" style="width: 170px;"> 历史签名</li>
                <li class="tit_help" onclick="showSignFont(this,6);" style="width: 170px; display: none;"> 授权签名</li>
                <!-- 					   -->
                <li class="tit_help selected" onclick="showSignFont(this,4);" style="width: 170px;">
                    
                    
                        模板印章
                    
                </li>
                
            </ul>
            <div class="clear"></div>
        </div>
        <div class="bgwhite writeNameArea mt7 pb20">
            <div class="sign_conts" id="sign_cont_01" style="display: none;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tbody>
                    <tr>
                        <td width="15%"></td>
                        <td width="70%"></td>
                        <td width="15%"></td>
                    </tr>
                    <tr>
                        <td height="20"></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td class="f14 pl25" colspan="3" style="padding-left: 220px">你的默认签名</td>
                    </tr>
                    <tr>
                        <td colspan="3" style="text-align: center">
                            <div class="default-box input2 mt10">
                                <img id="defaultSeal" src="https://www.tsign.cn/user/sign!page" style="max-height:100%;max-width:100%" sealid="0">
                                <input id="nMD5" type="hidden" value="" style="cursor: pointer;">
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div class="sign_conts" id="sign_cont_02" style="display: none;">
                <input name="startIndex" id="startIndex" type="hidden" value="0" style="cursor: pointer;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tbody>
                    <tr>
                        <td width="15%"></td>
                        <td width="70%"></td>
                        <td width="15%"></td>
                    </tr>
                    <tr>
                        <td height="20"></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td class="f14 pl25" colspan="3">最近使用的签名<br>
                            <a id="before" class="btn_use_sign fl" style="background-color: rgb(224, 224, 224); cursor: pointer;">上一页</a>
                            <a id="after" href="javascript:getAfterThree();" class="btn_use_sign fl" style="cursor: pointer;">下一页</a>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <div style="width:600px;">
                                <div class="history-box ml25 mt10 input2">
                                    <img id="firstSeal" src="https://www.tsign.cn/user/sign!page" style="display: none;cursor:pointer;" name="imgPath1" onclick="javascript:selectSeal(this);">
                                </div>
                                <div class="history-box ml25 mt10 input2">
                                    <img id="secondSeal" src="https://www.tsign.cn/user/sign!page" style="display: none;cursor:pointer;" name="imgPath1" onclick="javascript:selectSeal(this);">
                                </div>
                                <div class="history-box ml25 mt10 input2">
                                    <img id="thirdSeal" src="https://www.tsign.cn/user/sign!page" style="display: none;cursor:pointer;" name="imgPath1" onclick="javascript:selectSeal(this);">
                                </div>
                                <input id="hMD5" type="hidden" value="" style="cursor: pointer;">
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="sign_conts" id="sign_cont_06" style="display: none;">
                <input name="startIndexgrant" id="startIndexgrant" type="hidden" value="0" style="cursor: pointer;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tbody>
                    <tr>
                        <td width="15%"></td>
                        <td width="70%"></td>
                        <td width="15%"></td>
                    </tr>
                    <tr>
                        <td height="20"></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td class="f14 pl25" colspan="3">您的授权印章<br>
                            <a id="beforegrant" class="btn_use_sign fl" style="background-color: rgb(224, 224, 224); cursor: pointer;">上一页</a>
                            <a id="aftergrant" href="javascript:getAfterThree(&#39;grant&#39;);" class="btn_use_sign fl" style="cursor: pointer;">下一页</a>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <div style="width:600px;">
                                <div class="grant-box ml25 mt10 input2">
                                    <img id="firstSealgrant" src="https://www.tsign.cn/user/sign!page" style="display: none;cursor:pointer;" name="imgPath1" onclick="javascript:selectSeal(this);">
                                </div>
                                <div class="grant-box ml25 mt10 input2">
                                    <img id="secondSealgrant" src="https://www.tsign.cn/user/sign!page" style="display: none;cursor:pointer;" name="imgPath1" onclick="javascript:selectSeal(this);">
                                </div>
                                <div class="grant-box ml25 mt10 input2">
                                    <img id="thirdSealgrant" src="https://www.tsign.cn/user/sign!page" style="display: none;cursor:pointer;" name="imgPath1" onclick="javascript:selectSeal(this);">
                                </div>
                                <input id="hMD5" type="hidden" value="" style="cursor: pointer;">
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="sign_conts" id="sign_cont_03" style="display: none;">
                <img src="https://www.tsign.cn/user/sign!page" style="display: none;" name="cordova" id="cordova">

                <div id="font">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                        <tbody>
                        <tr>
                            <td width="15%"></td>
                            <td width="70%"></td>
                            <td width="15%"></td>
                        </tr>
                        <tr>
                            <td height="20"></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td class="f14 pl25" colspan="3">
                                <span class="f14">你的默认签名</span>
                                <a id="clear" class="ml150" style="cursor: pointer;">
                                    <img src="./e 签宝_files/earse.png" class="mr5">
                                    <span class="black">清除</span>
                                </a>
                                <a id="eraser" class="ml150" style="display: none; cursor: pointer;">
                                    <span id="error" style="display=none">如果有错误，请使用橡皮擦：</span>
                                    <img src="./e 签宝_files/earse.png" class="mr5" style="display:none;">
                                    <span class="black" style="display:none;">橡皮檫</span>
                                </a>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3" id="draw" class="draw" style="left: 960px; top: 487px;">
                                <div class="fl   kbw-signature" id="sig" style="width:350px;height: 180px;margin-left:8px;">

                                <canvas id="canvas" width="348" height="178">Your browser doesn't support signing</canvas></div>
                                <div class="fr" style="width:150px;">
                                    <div class="clear"></div>
                                    <p class="f14 pl5 mt20"><span>请选择画笔宽度</span></p>
                                    <ul class="font_li_001" id="pen_size" style="margin-top:10px;">
                                        <li id="showPant1" class="selected">细</li>
                                        <li id="showPant2">中</li>
                                        <li id="showPant3">粗</li>
                                    </ul>
                                    <div id="color">
                                        <input class="i1" type="hidden" value="" style="cursor: pointer;">
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="sign_conts" id="sign_cont_04" style="display: block;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tbody>
                    <tr>
                        <td width="15%"></td>
                        <td width="70%"></td>
                        <td width="15%"></td>
                    </tr>
                    <tr>
                        <td height="20"></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td class="f14 pl25" colspan="3">浏览</td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <div class="fl" style="width:210px;" id="picSize">
                                <img src="./e 签宝_files/seal_820e8247-552e-4861-a6e6-bad92877305e" class="input2 ml25 mt10" style="width:170px;height:170px;" name="model" id="model" key="7358348/seal_820e8247-552e-4861-a6e6-bad92877305e" x="159" y="159">
                                <input id="dMD5" type="hidden" value="" style="cursor: pointer;">
                            </div>
                            <div class="fr" style="width:270px;">
                                <ul class="font_li_001" id="fonttype">
                                    
                                    
                                        <li id="fonttype1" class="selected" onclick="javascript:modelSeal(this)" value="star" style="margin-top: -5px">圆形印章
                                        </li>
                                        <li id="fonttype2" onclick="javascript:modelSeal(this)" value="oval" style="margin-top: -5px">椭圆形印章
                                        </li>
                                        <input type="text" class=" grey6 f12" style="width: 180px;margin-left: 5px;margin-top: 10px" placeholder="可在此处输入横向文" maxlength="8" id="typeName">
                                        <input type="text" class=" grey6 f12" style="width: 180px;margin-left: 5px;margin-top: 10px" placeholder="可在此处输入下弦文" maxlength="15" id="rune">
                                        <li id="click_li" onclick="javascript:modelSeal(&#39;&#39;)">点我生成印章</li>
                                    
                                </ul>
                                <div class="clear"></div>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div class="sign_conts" id="sign_cont_05" style="padding: 0px 40px; display: none;">
                <h4>请使用微信或者手机浏览器的扫一扫功能扫描以下二维码（此二维码五分钟内有效）：</h4>

                <div class="scan_contain" style="margin-top:10px">
                    <div class="scan_img">
                        <div id="qrcodeCanvas" style="width:200px;height:200px;padding:10px">
                        </div>
                    </div>
                    <div class="scan_tips" style="width:210px;float:right;font-size:10px">
                        提醒：通过扫描二维码功能签署的签名，即表示我同意将该签名作为我的正式签名，用于我（或我的代理）的各种文档处理用途，包括具有法律约束力的合约，与用笔在纸上签名具有相同效力。
                    </div>
                </div>
                <a class="scan_btn scan_refresh" href="javascript:refreshCode()" style="cursor: pointer;">刷新二维码</a>
            </div>

        </div>
        <div class="f12 pl30 lh24 pr30 contract_bottom" style="">
            提醒：单击“采用”，即表示我同意该签名将是我的签名，用于我（或我的代理）的各种文档处理用途，包括具有法律约束力的合约，与用笔在纸上的签名具有相同效力。
        </div>
        <div class="f14 ac mt20 pl190 contract_bottom" style="padding-left: 210px;" id="imgurl"><a href="javascript:getCanvasDate(model);" class="btn_use_sign fl">采用并签名</a></div>
    </div>
</div>

<input name="userName" id="userName" type="hidden" value="锦绣华程商业保理有限公司" style="cursor: pointer;">
<input name="userEmail" id="userEmail" type="hidden" value="zjjr56@qq.com" style="cursor: pointer;">
<input name="userPhone" id="userPhone" type="hidden" value="" style="cursor: pointer;">



<div class="content_0u ukeySign" style="right: 40%; top: 25%;display:none;overflow:auto;height: auto;padding: 0;box-shadow: 5px 5px 5px #999;display:none" id="uploadCloud">
    <div class="tips_01" style="background: #e74031;color: #fff;">
        <span class="f18 fl pl10">文件签署</span>

        <div class="cl"></div>
    </div>
    <div class="bgwhite writeNameArea mt7" style="overflow: inherit;">
        <div class="tips_cont_01">
            <div class="send_cont_li">
                <div class="mt10 ">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tbody id="cloudFileList">
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="bgwhite writeNameArea mt7 pb20 pages" style="width: auto;  overflow: auto;">
        <input type="button" style="background: rgb(231, 64, 49); width: 100px; height: 30px; color: rgb(255, 255, 255); text-align: center; border-radius: 3px; cursor: pointer;" value="印章签署">
        <input id="Ukey" type="button" style="background: rgb(231, 64, 49); width: 100px; height: 30px; color: rgb(255, 255, 255); text-align: center; border-radius: 3px; margin-right: 30%; cursor: pointer;" value="Ukey签署">
    </div>
    <div class="f14 ac mt20 pl20">
        <div class="cl">
            <!-- 					<span>当前使用chrome浏览器，使用ukey签署需要下载签名插件，前往<a href="#">下载</a></span> -->
        </div>
    </div>
</div>

<!-- ukey列表 -->
<div class="content_0u ukeyList" style="right: 33%; top: 25%;overflow:auto;width: 482px;height: auto;padding: 0;" id="uploadCloud">
    <div class="tips_01" style="text-align:center;">
        Ukey列表
    </div>
    <div class="bgwhite writeNameArea  " style="height: 250px;overflow: inherit;">
        <div class="tips_cont_01">
            <div class="send_cont_li">
                <div id="ukeytable">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
                        <thead>
                        <tr>
                            <td width="33%" height="33" bgcolor="#e7e7e7" class="pl25 f14 black">证书名称</td>
                            <td width="33%" height="33" bgcolor="#e7e7e7" class="pl25 f14 black">颁发单位</td>
                            <td width="33%" height="33" bgcolor="#e7e7e7" class="pl25 f14 black">有效期</td>

                        </tr>
                        </thead>
                        <tbody>

                        
                            
                        
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="bgwhite writeNameArea mt7 pb20" style="width: auto; text-align:center">


        <span class="alert" style="color:red;display:none;font-size:14px">证书未选择</span>
        <a id="signUkey" href="javascript:getCtrl();" class="btn_use_sign" style="display: block; width: 70px; margin: 2px auto; cursor: pointer;">选择</a>
        

    </div>
    <div class="f14 ac mt20 pl20">
        <div class="cl"></div>
    </div>
</div>

<!--骑缝签署选择范围-->
<div id="select-staple" class="content_0u" style="text-align: center; display: none;">
    <div class="tips_01 centers_001">定义签章页
        <span class="face_close"></span>
    </div>
    <div style="display: inline-block;text-align: left;margin: 80px 0px">
        <div style="margin: 10px 0px">
            
            <label class="selectRadio label-unclick" id="all-staple"></label><label>全部</label>
        </div>
        <div style="text-align: center;">
            
            <label class="selectRadio label-click" id="specific-staple"></label>
            <label>
                <span>范围：</span><input id="start-staple" class="range" type="number" min="1" value="1" default-data="1" max="11" style="cursor: pointer;"><span>-</span><input id="end-staple" class="range" type="number" min="1" default-data="11" max="11" style="cursor: pointer;">
            </label>
        </div>
    </div>
    <div style="margin-top: 20px">
        <a class="btn_use_sign select-range" style="cursor: pointer;">确定</a>
        <a class="btn_use_sign staple-close" style="cursor: pointer;">取消</a>
    </div>
</div>

<div id="center" class="userIEsign" style="right: 50%;display:none ;top: 35%;z-index: 999999;height: 180px;width: 390px">
    <strong>提示</strong>

    <p style="text-indent: 21pt;text-align: left;margin: 1px 5px;">
        目前仅支持IE浏览器进行Ukey签署，请使用IE浏览器进行文件签署，您可以在草稿箱中继续此文件的签署。</p>

    <div style="text-align:center">
        
    </div>
</div>

<div id="center" class="deleteUkey " style="right: 50%; top: 35%;display:none;z-index: 999999;">
    <strong>提示</strong>

    <p>使用ukey签署只能选择一种签署方式并只能加盖一个章，是否更换Ukey重新签署</p>

    <div style="text-align:center">
        <a class="close" style="display: inline-block; margin: 10px; cursor: pointer;" href="javascript:delteUkeyList();">是</a>
        <a class="close" style="display: inline-block; margin: 10px; cursor: pointer;" href="javascript:notChangeUkey();">否</a>
    </div>
</div>

<div id="center" class="non_Cert " style="right: 50%; top: 35%;display:none;z-index: 999999;">
    <strong>提示</strong>

    <p>您还未选择证书</p>

    <div style="text-align:center">

        <a class="close" style="display: inline-block; margin: 10px; cursor: pointer;" href="javascript:$(&#39;.non_Cert&#39;).hide();">确定</a>
    </div>
</div>
<!--****************底部操作*********************-->
<div style="position: fixed; width: 100%; top: 448px;" id="footer">
    <div class="bottomAction">
        <div class="wrap" style="width: 60%;">
            <div class="fl">
                
                    <a href="https://www.tsign.cn/user/sign!page?skip=writeContract&amp;sends=&amp;signdocId=6855614&amp;signType=1" style="cursor: pointer;"></a>
                
                
            </div>
            <div class="fr">
                <a href="https://www.tsign.cn/user/doc!page?skip=doclist-view&amp;type=1" id="saveBtn" style="cursor: pointer;">
                    <img src="./e 签宝_files/fasong_57.png"></a>
                <a class="send ml30" onclick="javascript:inputPassword();" style="cursor: pointer;"></a>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" language="javascript">
    //已使用
    var UKEY_CERT = "";
    function showSignFont(obj, j) {
        if (false) {
            showUrlMust("您还未完成实名认证，无法签章", "account!page?skip=identify");
            return
        }
        if ($(obj) != $(".nav_li_001 li").eq(4) && TIMER != "") {
            clearInterval(TIMER);
        }
        $("#onlineSeal").attr("sealId", "");
        $("#onlineSeal").attr("templateName", "");
        $("#onlineSeal").attr("sealWay", "");
        $("#onlineSeal").attr("rune", "");
        $("#onlineSeal").attr("typeName", "");
        $("#onlineSeal").attr("key", "");
        $(".tit_help").removeClass("selected");
        $(obj).addClass("selected ");
        $(".sign_conts").hide();
        $("#sign_cont_0" + j).show();
        $("#imgurl").html("");
        if (j == 1) {//默认签名
            getDefaultSeal();
            document.getElementById("flagimage").value = "1";
            $(".contract_bottom").show();
            $("#imgurl").append("<a href='javascript:getCanvasDate(defaultSeal);' class='btn_use_sign fl' >采用并签名</a>");
        } else if (j == 2) {//历史签名
//            $("#firstSeal").attr('style', 'width:140px;height:140px');
//            $("#secondSeal").attr('style', 'width:140px;height:140px');
//            $("#thirdSeal").attr('style', 'width:140px;height:140px');
            getThreeSeal();
            $("#sign_cont_02").find("img").each(function () {
                $(this).css("cursor", "pointer");
            });
            document.getElementById("flagimage").value = "2";
            $(".contract_bottom").show();
        } else if (j == 6) {//授权签名
//            $("#firstSealgrant").attr('style', 'width:140px;height:140px');
//            $("#secondSealgrant").attr('style', 'width:140px;height:140px');
//            $("#thirdSealgrant").attr('style', 'width:140px;height:140px');
            getThreeSeal('grant');
            $("#sign_cont_06").find("img").each(function () {
                $(this).css("cursor", "pointer");
            });
            document.getElementById("flagimage").value = "6";
            $(".contract_bottom").show();
        }
//					else if (j == 3) {//手绘签名
// 					document.getElementById("flagimage").value = "3";
// 					$(".contract_bottom").show();
// 					$("#imgurl").append("<a href='javascript:getCanvasDate(cordova);' class='btn_use_sign fl' >采用并签名</a>");
// 				} 
        else if (j == 4) {//艺术签名
            if ($("#fonttype li").eq(0).css("display") == 'none') {
                $("#fonttype li").eq(1).click();
            } else {
                $("#fonttype li").eq(0).click();
            }
            document.getElementById("flagimage").value = "4";
            $(".contract_bottom").show();
            $("#imgurl").append("<a href='javascript:getCanvasDate(model);' class='btn_use_sign fl' >采用并签名</a>");
        } else {
            document.getElementById("flagimage").value = "5";
            $(".contract_bottom").hide();
            refreshCode();
        }
    }

    function inputPassword() {
        $("#password").val("");
        $("#rand").val("");
        if ($(".signFlag").length <= 0) {
            showAlert("没有添加任何签名");
            return;
        }
        var account = 'zjjr56@qq.com';
        var time = sessionStorage.getItem(account);
        if (time >= 3) {
            $("#randDiv").show();
            changeRand();
        }
        if (!(UKEY_CERT == "" || UKEY_CERT == undefined)) {
            $(".sign-type").html("ukey密码");
        }
        showFancybox('inputPassword');
    }
    function showRand() {

    }
</script>

<script type="text/javascript" language="javascript">
    //产生的所有印章
    var sealArray = new Array();
    var sealnum = 0;
    defaultSignAjax = function (obj) {

        /*if ($("#onlineChange").val()) {
            $("#" + $("#onlineChange").val()).attr("src", $(obj).attr("src"));
            $("#onlineChange").val("")
            $("#background,#content_sign").hide();
            return;
        }*/
        var sealJson = {};
        var oneSeal = {};
        var data = "";


        var id = $(obj).attr("id");
        data = $(obj).attr('src');
        var one = $("#onlineSeal").attr("objId");
        sealJson["objId"] = $("#onlineSeal").attr("objId");
        sealJson["sealId"] = $("#onlineSeal").attr("sealId");
        if ($(obj).attr("id") == "defaultSeal") {
            sealJson["sealId"] = $(obj).attr("sealId");
        }
        if (sealJson["sealId"] == "" || sealJson["sealId"] == null) {
            $("#sealCount").val(parseInt($("#sealCount").val()) + 1);
        }
        sealJson["templateName"] = $("#onlineSeal").attr("templateName");
        sealJson["imgUrl"] = $("#onlineSeal").attr("key");
//        console.log("sign:" + $("#onlineSeal").attr("key"));
        if ($(obj).attr("id") == "cordova") {
            sealJson["imgUrl"] = $(obj).attr("key");
            sealJson["sealWay"] = 3;
        }
        else if ($(obj).attr("id") == "model") {
            sealJson["sealWay"] = 1;
        } else {
            sealJson["sealWay"] = "";
        }
        sealJson["rune"] = $("#onlineSeal").attr("rune");
        sealJson["typeName"] = $("#onlineSeal").attr("typeName");
        var type = 0;
        if ($("#type").val() == 1) {
            type = 3;
        } else {
            if ($("#fonttype2").hasClass("selected")) {
                type = 15;
            } else {
                type = 9;
            }
        }
        sealJson["type"] = type;
        sealJson["signType"] = $("#onlineSeal").attr("signType");
        sealArray[$("#onlineSeal").attr("objId")] = sealJson;
        //双击印章更换时，将新选的seal去替换老seal
        for(var i in sealArray) {
            if (i=="") {
                sealArray[$("#onlineChange").val()] = sealArray[""];
                delete sealArray[i];
                $("#" + $("#onlineChange").val()).attr("src", $(obj).attr("src"));
                $("#onlineChange").val("");
                break;
            }
        }

        $("#" + one).attr("src", $(obj).attr("src"));
        $("#" + one).css('height', divPageHeight * (73 / 842.04) + 'px');
        $("#" + one).css('width', divPageWidth * (126 / 594.96) + 'px');
        $("#sealType").attr('sealId', $(obj).attr("sealId"));
        $("#sealType").attr('key', $(obj).attr("key"));
        var adaptWidth = $(obj).attr("X");
        var adaptHeight = $(obj).attr("Y");
        var screenWidth = screen.width;
        var adapt = screenWidth / 1440;
        adaptWidth = adaptWidth * adapt;
        adaptHeight = adaptHeight * adapt;
        $("#" + $("#onlineSeal").attr("objId")).css('width', adaptWidth);
        $("#" + $("#onlineSeal").attr("objId")).css('height', adaptHeight);
        conPosition("content_sign");
        $("#sealType").val(id);
        $("#" + one).attr("objwidth", $(obj).attr("X"));
        $("#" + one).attr("objheight", $(obj).attr("Y"));
        $("#width").val($(obj).attr("X"));
        $("#height").val($(obj).attr("Y"));
        $("#background,#content_sign").hide();

        if (true) {
            $("#typeName").val("");
            $("#rune").val("");
        }
        //若是骑缝签直接顶位到右侧
        if($("#currentSignType").val() == 3){
            var pagePdfWidth = $("#page_" + '6855614' + "_1").width();
            var pageSealWidth =$("#" + one).width();
            $("#" + one).css('left',pagePdfWidth - pageSealWidth);
            //    $("#" + one).css('right',0);
            $("#stapleImg").addClass("lock-option");
        }
    }
    checkNameLength = function () {
        if (true) {
            return;
        }
        var nameLength = '锦绣华程商业保理有限公司'.length;
        var number = [5, 6, 10, 11, 12, 13, 17, 18];
        if (number.indexOf(nameLength) > -1) {
            if (2 ==1)
            {
                $("#fonttype li").eq(0).css("display", "none");
            }
        }
    }
    function isIEBrowser() {
        var isIE11 = (navigator.userAgent.indexOf('MSIE') > -1 && navigator.userAgent.indexOf('Trident') > -1) ||
                (navigator.userAgent.indexOf('Trident') > -1 && navigator.userAgent.indexOf('rv:11') > -1);
        if (isIE11) {
            return true;
        }
        return (navigator.appName.indexOf("Microsoft Internet") != -1);
    }
    isContinue = function () {
        if (!isIEBrowser()) {
            showFancyboxBlockUI();
            $(".userIEsign").show();
            userFlag = true;
            return false;
        }
        return true;
    }

    checkNameLength();
</script>

<script type="text/javascript">
    function conPosition(id) {
        $("#background, #" + id).show();

        $('#' + id).find('.face_close').click(function () {

            $("#background, #" + id).hide();
            $("#" + $("#onlineSeal").attr("objId")).remove();
            if ($(".signFlag").length < MAX_SEAL_SIZE ) {
                $("#qmImg").removeClass("lock-option");
            }

        });
        $('#' + id).find('.view_close').click(function () {
            if (1 == viewFlag) {
                $("#" + id).hide();
            } else {
                $("#background, #" + id).hide();
            }
        });
        var oBackground = document.getElementById('background');
        var dw = $(document).width();
        var dh = $(document).height();
        oBackground.style.width = dw + 'px';
        oBackground.style.height = dh + 'px';
        var oContent = document.getElementById(id);
        var scrollTop = document.documentElement.scrollTop
                || document.body.scrollTop;
        var l = (document.documentElement.clientWidth - oContent.offsetWidth) / 2;
        var t = document.documentElement.clientHeight / 2 - $("#" + id).height() / 2;

        oContent.style.left = l + 'px';
        oContent.style.top = t + 'px';
        
        console.log("flagx:"+ $('#' + id).attr("flagx"));
        console.log("flagy:"+ $('#' + id).attr("flagy"));
        console.log("x:"+ $('#' + id).attr("x"));
        console.log("y:"+ $('#' + id).attr("y"));
    }
</script>

<script type="text/javascript">
    var divPageWidth = 0;
    var divPageHeight = 0;

    var chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
        'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
        'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];

    //生成八位configID
    function generateConfigID() {
        var res = "";
        for (var i = 0; i < 8; i++) {
            var id = Math.ceil(Math.random() * 35);
            res += chars[id];
        }
        return res;
    }
    function allowDrop(ev) {
        ev = ev || window.event;
        ev.preventDefault();
        ev.stopPropagation();
    }

    function drag(obj, ev, type) {

        ev = ev || window.event;
        ev.stopPropagation();

        $(document).unbind("mousemove");

        var hasDrap = obj.getAttribute("hasDrap");
        var configid = obj.id;

        $("#configID").val(configid);

        if ("0" == hasDrap) {

            if (1 == type) {
// 			    	    var signImgSrc = $("#signImgSrc").val();
// 			    	    if(signImgSrc){
// 			    	    	backImg = signImgSrc;
// 			    	    	var signType = $("#signType").val();
// 			    	    	if(2==signType){
// 			    	    		$("#"+obj.id).css('height',divPageHeight*(100/842.04)+'px');
// 			    	    		$("#"+obj.id).css('width',divPageWidth*(100*(508/403)/594.96)+'px');
// 			    	    	}else{
// 			    	    		$("#"+obj.id).css('height',divPageHeight*(73/842.04)+'px');
// 			    	    		$("#"+obj.id).css('width',divPageWidth*(126/594.96)+'px');
// 			    	    	}
// 			    	    }else{
                backImg = "../images_2.0/qianmingchu.png";
                $("#" + obj.id).css("width", "140px");
                $("#" + obj.id).css("height", "140px");
// 			    	    }
            }
            else if (2 == type) {
                backImg = "../images_2.0/riqi.png";
                $("#" + obj.id).css("width", "136px");
                $("#" + obj.id).css("height", "32px");
            }

            obj.src = backImg;

            var userEmail = $("#userEmail").val();
            $("#" + configid).attr("name", "configFlag");
            $("#" + configid).attr("type", type);
            $("#" + configid).attr("userEmail", userEmail);
            $("#" + configid).attr("typeflag", type);

            //obj.style.position='absolute'; // 为新创建的DIV指定绝对定位
            //obj.style.left=ev.clientX-15+'px';  // 指定创建的DIV在文档中距离左侧的位置
            //obj.style.top=ev.clientY-50+'px';  // 指定创建的DIV在文档中距离顶部的位置

        }

        if ($("#" + configid + "_divX")) {
            hideDeleteDiv(configid);
        }

        //var dc = document.getElementById(configid);
        //计算出鼠标的标签的位置
        //得到图片的top和left

        var hasDrap = obj.getAttribute("hasDrap");
        var flagx = obj.offsetLeft;
        var flagy = obj.offsetTop;

        var x = 0;
        var y = 0;

        if (0 == hasDrap) {
            x = ev.clientX - flagx;
            y = ev.clientY - flagy - 45;
        } else {
            var docID = obj.getAttribute("docID");
            var pageNo = obj.getAttribute("pageNo");
            var pageX = $('#page_' + docID + '_' + pageNo).offset().left;
            var pageY = $('#page_' + docID + '_' + pageNo).offset().top;
            x = ev.clientX - (flagx + pageX);
            y = ev.clientY - (flagy + pageY) + $(document).scrollTop();
        }

        $("#" + configid).attr("flagx", x);
        $("#" + configid).attr("flagy", y);
        //标识类型 1：签字 2：日期 3：公章
        var type = $("#" + configid).attr("type");
        
        //TODO 获取坐标
        console.log("flagx:"+ $('#' + configid).attr("flagx"));
        console.log("flagy:"+ $('#' + configid).attr("flagy"));
        console.log("x:"+ $('#' + configid).attr("x"));
        console.log("y:"+ $('#' + configid).attr("y"));

        //生成一个configID
        /* var configid = obj.getAttribute("configid");

         if (!configid) {
         configid = generateConfigID();
         } */
        //ev.dataTransfer.setData("Text", configid);
        //obj.setAttribute("configid", configid);
        //dc.setAttribute("id", configid);
        //dc.setAttribute("typeflag", type);
    }

    function drop(ev, obj, index, docID, signID) {

        ev = ev || window.event;
        ev.preventDefault();
        ev.stopPropagation();
        var signID = $("#signID").val();
        var ID = $("#configID").val();
        var dc = document.getElementById(ID);
        //标识类型 1：签字 2：日期 3：公章
        var typeflag = $("#" + ID).attr("typeflag");

        var configid = $("#" + ID).attr("configid");
        if ("signFlag" != $(ev.target).attr("class") && "smallDiv" != $(ev.target).attr("class")) {
            ev.target.appendChild(document.getElementById(ID));
        }
        dc.style.left = "";  // 指定创建的DIV在文档中距离左侧的位置
        dc.style.top = "";
        //计算出鼠标的标签的位置
        //得到图片的top和left
        var flagx = $("#" + ID).attr("flagx");
        var flagy = $("#" + ID).attr("flagy");
        x = ev.clientX - flagx;
        y = ev.clientY - flagy;

        var divx = obj.getBoundingClientRect().left;
        var divy = obj.getBoundingClientRect().top;
        var imgHeight = 0;

        if (typeflag == 1) {
            imgHeight = 60;
            $("#" + ID).attr("class", "signFlag");
            var signImgSrc = $("#signImgSrc").val();
            var signType = $("#signType").val();
            if (2 != signType) {
                $("#" + ID).attr("ondblclick", "selectSignType('" + ID + "')");
            }
        } else if (typeflag == 2) {
            imgHeight = 32;
        } else if (typeflag == 3) {
            imgHeight = 32;
        } else if (typeflag == 4) {
            imgHeight = 32;
        } else if (typeflag == 5) {
            imgHeight = 140;
        }
        imgHeight = 0;

        //宽
        x = x - divx;
        //高
        y = y - divy;
        if (x < 0 || y < 0 || x > 650 || y > 1100) {
            //showAlert("超出边界。请重试");
            //$("#"+ID).remove();
            //return
        }
        var pagePdfWidth = $("#page_" + '6855614' + "_1").width();
        var pagePdfHeight = $("#page_" + '6855614' + "_1").height();
        var pageSealWidth = $("#" + ID).width();
        var pageSealHeight = $("#" + ID).height();
        //判断如果是骑缝签署都是居右
        if($("#" + ID).attr("signType") == "3"){
            $("#" + ID).css("margin-left",pagePdfWidth - parseInt(pageSealWidth));
        }else{
            $("#" + ID).css("margin-left", x + "px");
        }
        $("#" + ID).css("margin-top", y + "px");

        $("#" + ID).attr("hasDrap", "1");
        $("#" + ID).attr("onclick", "showDeleteDiv('" + configid + "')");
        $("#" + ID).attr("onmouseout", "pageOnmouseout('" + configid + "')");
        //$("#"+ID).attr("onmousemove", "");
        //$("#"+ID).attr("onmouseleave", "");
        //$("#"+ID).attr("onmousedown", "");

        $("#" + ID).attr("signID", signID);
        $("#" + ID).attr("docID", docID);
        $("#" + ID).attr("pageNo", index);
        $("#" + ID).css("position", "absolute");
        var w = $(".page").width();
        var h = $(".page").height();
        x = x / w;
        y = y / h;


        if (x < 0 || y < 0 || (pageSealWidth / pagePdfWidth) + x > 1 || (pageSealHeight / pagePdfHeight) + y > 1) {
            showAlert("超出范围，请重试");
            removeConfig(ID);
            return;
        }
        $("#" + ID).attr("x", x);
        $("#" + ID).attr("y", y);
        var signType = $("#signType").val();
        var toUser = $("#userEmail").val();

        //在页面上展示相应图片
// 				var signImgSrc = $("#signImgSrc").val();
// 				if(!signImgSrc){
// 					if(typeflag==1){
// 						selectSignType();
// 					}
// 				}else{
//					$(".signFlag").attr("src",signImgSrc);
        var signType = $("#signType").val();
        if (2 == signType) {
            $("#" + ID).css('height', divPageHeight * (100 / 842.04) + 'px');
            $("#" + ID).css('width', divPageWidth * (100 * (508 / 403) / 594.96) + 'px');
        } else {
            $("#" + ID).css('height', divPageHeight * (73 / 842.04) + 'px');
            $("#" + ID).css('width', divPageWidth * (126 / 594.96) + 'px');
        }
//				}
        var id = $("#sealType").val();
        if ("" != id) {
// 	    			var adaptWidth = $("#width").val();
// 		    		var adaptHeight = $("#height").val();
            var adaptWidth = $("#" + ID).attr("objwidth");
            var adaptHeight = $("#" + ID).attr("objheight");
            var screenWidth = screen.width;
            var adapt = screenWidth / 1440;
            adaptWidth = adaptWidth * adapt;
            adaptHeight = adaptHeight * adapt;
            $("#" + ID).css('width', adaptWidth);
            $("#" + ID).css('height', adaptHeight);
        }
    }

    function hideOrShow(id) {
        var docCount = $("#pageNum").text();
        if (docCount > 1) {
            if ($("#" + id).css("display") == "none") {
                $(".rightPageList").hide();
                $("#" + id).show();
            } else {
                $("#" + id).hide();
            }
        }
    }

    function showOrHide(id) {
        var docCount = $("#pageNum").text();
        if (docCount > 1) {
            $(".rightPageList").hide();
            $("#" + id).show();
        }
    }

    $(function () {

        //在这里
        var firstPage = $(".page").attr("id"), $offsetTop = $("#" + firstPage).offset().top, $leftMargin = $("#" + firstPage).offset().left - $("#left").width(), $signPicW = $("#qianmingchu").width();

        function mouseFollow(left, middle) {
            //控制上下左右边界
            function positionControl() {
                $(".smallDiv").mouseup(function (ex) {
                    var $container = $(middle);
                    var $this = $(this);
                    /* if(parseInt($this.offset().top) > $container.height()-$this.height() && $this.offset().left > ($container.width()+$(left).width()-$this.width())){
                     $this.animate({left:$container.width() - $this.width() + "px",top:$container.height() - $this.height() + "px"},300)
                     }else if(parseInt($this.offset().top) > $container.height()-$this.height() && $this.offset().left < ($container.width()+$(left).width()-$this.width())){
                     $this.animate({left:0,top:$container.height() - $this.height() + "px"},300)
                     }else */
                    if ($this.offset().left - $leftMargin < $(left).width()) {
                        $this.animate({left: "0px"}, 300)
                    } else if ($this.offset().top < $container.offset().top) {
                        $this.animate({top: "0px"}, 300)
                    } else if ($this.offset().left > ($container.width() + $(left).width() - $this.width())) {
                        $this.animate({left: $container.width() - $this.width() + "px"}, 300)
                    } else if (parseInt($this.offset().top) > $container.height() - $this.height()) {
                        $this.animate({top: $container.height() - $this.height() + "px"}, 300)
                    }
                })
            }

            var UkeyCount = 0;
            var frist = true;
            var userFlag = false;
            UkeyAccount = function () {
                var certList = '[{"id":6592894,"startDate":"2017-03-31 09:47:30","raid":"4012456939","certName":"锦绣华程商业保理有限公司","sn":"4012456939","issuer":"CFCA ACS OCA31","status":1,"endDate":"2019-03-31 09:47:30","modifyDate":"2017-03-31 09:47:36","type":0,"createDate":"2017-03-31 09:47:36"}]';
                if (certList == '') {
                    return;
                }
                var certs = JSON.parse(certList);
                $(certs).each(function (index) {
                    if (certs[index]["type"] == 1) {
                        UkeyCount++;
                    }
                });
            }
            function selectLabel(id,ev) {
                ev.pageX = ev.pageX == undefined ? 117 : ev.pageX;
                ev.pageY = ev.pageY == undefined ? 141 : ev.pageY;
                //设置鼠标跟随
                $("#" + id).css({"left": ev.pageX, "top": (ev.pageY - $(document).scrollTop())});
                $("#" + id).css({"display": "block"});
                getSeals();
                //    $("#defaultSignFont").click();
                var signImgSrc = $("#signImgSrc").val();
                if (signImgSrc) {
                    if ("qianmingchu" == id) {
                        $("#" + id).attr("src", "../images_2.0/qianmingchu.png");
                        var signType = $("#signType").val();
                        if (2 == signType) {
                            $("#" + id).css('height', divPageHeight * (100 / 842.04) + 'px');
                            $("#" + id).css('width', divPageWidth * (100 * (508 / 403) / 594.96) + 'px');
                        } else {
                            $("#" + id).css('height', divPageHeight * (73 / 842.04) + 'px');
                            $("#" + id).css('width', divPageWidth * (126 / 594.96) + 'px');
                        }
                    }
                }
                //设置鼠标跟随显示区域
                $(document).bind("mousemove", function (e) {
                    /*  if(e.pageX>($(left).width()+$(middle).width()+$leftMargin)|| e.pageY>($(middle).height())){
                     $("#"+id).hide();
                     }else if(e.pageX>($(left).width()+$(middle).width()+$leftMargin)){
                     $("#"+id).css({"left":($(left).width()+$(middle).width()-$("#"+id).width()+$leftMargin),"top": (e.pageY)});
                     }else if(e.pageY>($(middle).height()-$("#"+id).height())){
                     $("#"+id).css({"left": e.pageX,"top":($(middle).height()-$("#"+id).height())});
                     }else{
                     $(document).css("cursor","help"); */
                    if ($("#qianmingchu").attr("src") == $("#signImgSrc").val()) {
                        var signType = $("#signType").val();
                        if (2 == signType) {
                            $("#qianmingchu").css({"width": "149px", "height": "129px"});
                        } else {
                            $("#qianmingchu").css({"width": "129px", "height": "40px"});
                        }
                        $("#qianmingchu").css({"width": "64px", "height": "64px"});
                    } else {
                        $("#qianmingchu").css({"width": "64px", "height": "64px"});
                    }
                    $("#" + id).show().css({"left": (e.pageX + 2), "top": (e.pageY - $(document).scrollTop())});
                    /* } */
                });
            }

            initActionListener = function(){


                isShowSelect = function(ev){
                    if(UKEY_CERT != "" && $(".signFlag").length > 0){
                        showFancyboxBlockUI();
                        $(".deleteUkey .msgContent").css("padding", "30px 50px");
                        $(".deleteUkey").show();
                        return;
                    }
                    if (UkeyCount != 0) {
                        var flag = isContinue();
                        frist = false;
                        if (!flag) {
                            return;
                        }
                    }
                    //若无证书，直接使用印章
                    if (UkeyCount == '' || userFlag) {
                        selectLabel("qianmingchu",ev);
                    } else {

                        //若无ukey，直接印章
                        if (UkeyCount == 0) {
                            selectLabel("qianmingchu",ev);
                            //有ukey，显示列表
                        } else {
                            showFancyboxBlockUI();
                            $(".ukeyList").show();

                        }
                    }
                }
                $("#qmImg").bind("mousedown" , function(event){
                    event.preventDefault();
                    if($(this).closest(".lock-option").length > 0 ){
                        return ;
                    }
                    $("#currentSignType").val(1);
                    isShowSelect(event);
                });
                $("#stapleImg").bind("mousedown" , function(event){
                    event.preventDefault();
                    if($(this).closest(".lock-option").length > 0 ){
                        return ;
                    }
                    $("#currentSignType").val(3);
                    isShowSelect(event);
                });
                $("#signUkey").bind("click",function(event){
                    if (UKEY_CERT != "") {
                        selectLabel("qianmingchu",event);
                        //使用ukey二次签署
                    }
                });
                $(".return").bind("click",function(event){
                    $(".ukeyList").hide();
                    $(".userIEsign").hide();
                    closeAlert();
                    UKEY_CERT = "";
                    userFlag = true;
                    $("#chooseOne").hide();
                    selectLabel("qianmingchu",event);
                });
                $(".ukeyline").bind("click", function () {
                    $(".alert").hide();
                    $(".ukeyline").removeClass("ukeyline-selected");
                    $(this).addClass("ukeyline-selected");
                    $("#chooseOne").html("证书已选择:" + $(this).find(".certName").html());
                    UKEY_CERT = $(this).find("input").val();
                });
                getCtrl = function () {
                    if (UKEY_CERT == "") {
                        $(".ukeyList").addClass("shake");
                        $(".alert").show();
                        timer = setTimeout(function () {
                            $(".ukeyList").removeClass("shake");
                            clearTimeout(timer);
                        }, 500);
                    } else {
                        closeAlert();
                        $(".alert").hide();
                        $("#chooseOne").show();
                        $(".ukeyList").hide();
                        userFlag = true;
                    }
                }

                delteUkeyList = function () {
                    $("#stapleImg").removeClass("lock-option");
                    $("#chooseOne").html("");
                    UKEY_CERT = "";
                    $(".signFlag").remove();
                    sealArray = new Array();
                    $(".deleteUkey").hide();
                    $(".ukeyList").show();

                    $(".ukeyline").removeClass("ukeyline-selected");
                }
                notChangeUkey = function () {
                    closeAlert();
                    $(".deleteUkey").hide();
                }
            }


            initDragListener = function(){
                //生成拖动印章模板
                $("#qmImg").bind("dragstart",function(ev){
                    ev.pageX = ev.pageX == undefined ? 117 : ev.pageX;
                    ev.pageY = ev.pageY == undefined ? 141 : ev.pageY;
                    //设置鼠标跟随
                    $("#qianmingchu").css({"left": ev.pageX, "top": (ev.pageY - $(document).scrollTop())});
                    $("#qianmingchu").css({"display": "block"});
                    getSeals();
                }) ;
                $("#qmImg").bind("drag",function(e){
                    $("#" + id).show().css({"left": (e.pageX + 2), "top": (e.pageY - $(document).scrollTop())});
                })
            }
            UkeyAccount();
            initActionListener();




            //单击选中左侧标签
//            $(document).bind("click", function (ev) {
//                UkeyAccount();
//                /*                function selectLabel(id) {
//                 ev.pageX = ev.pageX == undefined ? 117 : ev.pageX;
//                 ev.pageY = ev.pageY == undefined ? 141 : ev.pageY;
//                 //设置鼠标跟随
//                 $("#" + id).css({"left": ev.pageX, "top": (ev.pageY - $(document).scrollTop())});
//                 $("#" + id).css({"display": "block"});
//                 getSeals();
//                 //    $("#defaultSignFont").click();
//                 var signImgSrc = $("#signImgSrc").val();
//                 if (signImgSrc) {
//                 if ("qianmingchu" == id) {
//                 $("#" + id).attr("src", "../images_2.0/qianmingchu.png");
//                 var signType = $("#signType").val();
//                 if (2 == signType) {
//                 $("#" + id).css('height', divPageHeight * (100 / 842.04) + 'px');
//                 $("#" + id).css('width', divPageWidth * (100 * (508 / 403) / 594.96) + 'px');
//                 } else {
//                 $("#" + id).css('height', divPageHeight * (73 / 842.04) + 'px');
//                 $("#" + id).css('width', divPageWidth * (126 / 594.96) + 'px');
//                 }
//                 }
//                 }
//                 //设置鼠标跟随显示区域
//                 $(document).bind("mousemove", function (e) {
//                 /!*  if(e.pageX>($(left).width()+$(middle).width()+$leftMargin)|| e.pageY>($(middle).height())){
//                 $("#"+id).hide();
//                 }else if(e.pageX>($(left).width()+$(middle).width()+$leftMargin)){
//                 $("#"+id).css({"left":($(left).width()+$(middle).width()-$("#"+id).width()+$leftMargin),"top": (e.pageY)});
//                 }else if(e.pageY>($(middle).height()-$("#"+id).height())){
//                 $("#"+id).css({"left": e.pageX,"top":($(middle).height()-$("#"+id).height())});
//                 }else{
//                 $(document).css("cursor","help"); *!/
//                 if ($("#qianmingchu").attr("src") == $("#signImgSrc").val()) {
//                 var signType = $("#signType").val();
//                 if (2 == signType) {
//                 $("#qianmingchu").css({"width": "149px", "height": "129px"});
//                 } else {
//                 $("#qianmingchu").css({"width": "129px", "height": "40px"});
//                 }
//                 $("#qianmingchu").css({"width": "64px", "height": "64px"});
//                 } else {
//                 $("#qianmingchu").css({"width": "64px", "height": "64px"});
//                 }
//                 $("#" + id).show().css({"left": (e.pageX + 2), "top": (e.pageY - $(document).scrollTop())});
//                 /!* } *!/
//                 });
//                 }*/
//                //qmImg:单页 stapleImg:骑缝签章
//                if ($(ev.target).closest("#qmImg").length > 0 || $(ev.target).closest("#stapleImg").length > 0 || $(ev.target).attr("id") == "return" || $(ev.target).attr("id") == "signUkey") {
//                    if($(ev.target).closest(".lock-option").length > 0 ){
//                        return ;
//                    }
//                    if($(ev.target).closest("#qmImg").length > 0){
//                        $("#currentSignType").val(1);
//                    }else if($(ev.target).closest("#stapleImg").length > 0 ){
//                        $("#currentSignType").val(3);
//
//                    }
//                    //第一次点击判断是否进行ukey签署
//                    if (frist && $(ev.target).closest("#qmImg").length > 0) {
//                        if (UkeyCount != 0) {
//                            var flag = isContinue();
//                            frist = false;
//                            if (!flag) {
//                                return;
//                            }
//                        }
//                    }
//                    if (frist && $(ev.target).closest("#stapleImg").length > 0) {
//                        if (UkeyCount != 0) {
//                            var flag = isContinue();
//                            frist = false;
//                            if (!flag) {
//                                return;
//                            }
//                        }
//                    }
//                    $("#riqi").css({"display": "none"});
//                    $(document).unbind("mousemove");
//                    //选择ukey点击确定
//                    if (UKEY_CERT != "" && $(ev.target).attr("id") == "signUkey") {
//
//                        selectLabel("qianmingchu",ev);
//                        return;
//                        //使用ukey二次签署
//                    }
//                    if (UKEY_CERT != "" && ($(ev.target).closest("#qmImg").length > 0 || $(ev.target).closest("#stapleImg").length > 0) && $(".signFlag").length > 0) {
////                        if($(".signFlag[signtype=1]").length > 0){
//                        showFancyboxBlockUI();
//                        $(".deleteUkey .msgContent").css("padding", "30px 50px");
//                        $(".deleteUkey").show();
//                        return;
////                        }else{
////                            $("#currentSignType").val(1);
////                            selectLabel("qianmingchu");
////                        }
//
//
//                    }
//
//                    if ($(ev.target).attr("id") == "return") {
//                        $(".ukeyList").hide();
//                        $(".userIEsign").hide();
//                        closeAlert();
//                        UKEY_CERT = "";
//                        userFlag = true;
//                        $("#chooseOne").hide();
//                        selectLabel("qianmingchu",ev);
//                        return;
//                    }
//
//                    //若无证书，直接使用印章
//                    if (UkeyCount == '' || userFlag) {
//                        selectLabel("qianmingchu",ev);
//                    } else {
//
//                        //若无ukey，直接印章
//                        if (UkeyCount == 0) {
//                            selectLabel("qianmingchu",ev);
//                            //有ukey，显示列表
//                        } else {
//                            showFancyboxBlockUI();
//                            $(".ukeyList").show();
//
//                        }
//                    }
//
//                } else if ($(ev.target).attr("id") == "rqImg") {
//                    $("#qianmingchu").css({"display": "none"});
//                    $(document).unbind("mousemove");
//                    selectLabel("riqi",ev);
//                } else {
//                    $("#riqi").css({"display": "none"});
//                    $("#qianmingchu").css({"display": "none"});
//                    $(document).unbind("mousemove");
//                }
//
////                $(".ukeyline").bind("mouseover", function () {
////                    $(".ukeyline").removeClass("ukeyline-move")
////                    $(this).css("cursor", "pointer");
////                    if ($(this).attr("class").indexOf("ukeyline-selected") > 0) {
////                        return;
////                    }
////
////                    $(this).addClass("ukeyline-move")
////
////                });
////                $(".ukeyline").bind("mouseout", function () {
////                    $(".ukeyline").removeClass("ukeyline-move")
////                });
//                $(".ukeyline").bind("click", function () {
//                    $(".alert").hide();
//                    $(".ukeyline").removeClass("ukeyline-selected");
//                    $(this).addClass("ukeyline-selected");
//                    $("#chooseOne").html("证书已选择:" + $(this).find(".certName").html());
//                    UKEY_CERT = $(this).find("input").val();
//                });
//
//                userSeal = function () {
//
//                }
//                getCtrl = function () {
//                    if (UKEY_CERT == "") {
//                        $(".ukeyList").addClass("shake");
//                        $(".alert").show();
//                        timer = setTimeout(function () {
//                            $(".ukeyList").removeClass("shake");
//                            clearTimeout(timer);
//                        }, 500);
//                    } else {
//                        closeAlert();
//                        $(".alert").hide();
//                        $("#chooseOne").show();
//                        $(".ukeyList").hide();
//                        userFlag = true;
//                    }
//                }
//
//                delteUkeyList = function () {
//                    $("#stapleImg").removeClass("lock-option");
//                    $("#chooseOne").html("");
//                    UKEY_CERT = "";
//                    $(".signFlag").remove();
//                    sealArray = new Array();
//                    $(".deleteUkey").hide();
//                    $(".ukeyList").show();
//
//                    $(".ukeyline").removeClass("ukeyline-selected");
//                }
//                notChangeUkey = function () {
//                    closeAlert();
//                    $(".deleteUkey").hide();
//                }
//
//
//            });

        }

        //调用鼠标跟随方法
        mouseFollow("#left", ".page");

        //合同页面单击
        contractClick = function (event, id) {

            var indexOfPage, ex = id, filename = 0;
            $("#onlineSeal").attr("objId", "");
            /*$("#onlineSeal").attr("sealId", "");
            $("#onlineSeal").attr("templateName", "");
            $("#onlineSeal").attr("sealWay", "");
            $("#onlineSeal").attr("rune", "");
            $("#onlineSeal").attr("typeName", "");
            $("#onlineSeal").attr("key", "");*/
            $("#onlineSeal").attr("signType", $("#currentSignType").val());
            //循环遍历数组
            for (var i = 0; i < $(".page").length; i++) {
                var pageValue = $(".page:eq(" + i + ")").attr("id");
                if (pageValue == id) {
                    //当前合同页数的序列号
                    indexOfPage = i;
                    //循环当前合同之前存在几个文件
                    for (var s = i; s > 0; s--) {
                        if ($(".page:eq(" + s + ")").prev().prev("p").length > 0) {
                            filename++
                        }
                    }
                }
            }

            //取消鼠标跟随
            $(document).unbind("mousemove");
            event = event || window.event;
            event.preventDefault();
            event.stopPropagation();

            function createLabel(id) {
                var configID = generateConfigID();
                $("#onlineSeal").attr("objId", configID);
                var imgSrc = "../images_2.0/" + id + ".png";
                var signImgSrc = $("#signImgSrc").val();
                var className = "smallDiv";
                //判断选择的标签是不是签名
                if ("qianmingchu" == id) {
                    if (signImgSrc) {
                        imgSrc = signImgSrc;
                        var signType = $("#signType").val();
                        var signWidth = 0;
                        var signHeight = 0;
                        if (2 == signType) {
                            signHeight = divPageHeight * (100 / 842.04) + 'px';
                            signWidth = divPageWidth * (100 * (508 / 403) / 594.96) + 'px';
                        } else {
                            signHeight = divPageHeight * (73 / 842.04) + 'px';
                            signWidth = divPageWidth * (126 / 594.96) + 'px';
                        }
                        className = "signFlag";
                        //签名标签，判断图片边缘是否超过右侧
                        if (event.pageX > ($(left).width() + $("#" + ex).width() - $("#" + id).width() + $leftMargin) && event.pageX < ($(left).width() + $("#" + ex).width() + $leftMargin)) {
                            //width(height) = signWidth(height)某种不知名的计算方式，左边偏移：合同长度-标签长度，上方偏移：鼠标相对当前文档的位置-上方间距+滚动条高度-第几页*（合同高度+中间间距）-第几份合同*（合同标题的高度+br的高度）
                            $("#" + ex).append("<img id=\"" + configID + "\" src='" + imgSrc + "' class='" + className + "' style='width:" + signWidth + "; height:" + signHeight + "; left: " + ($("#" + ex).width() - $("#" + id).width()) + "px;top:" + (event.pageY - $offsetTop + $("#centerWar").scrollTop() - indexOfPage * ($("#" + ex).height() + 58.5) - filename * ($(".fileName").height() + $("br").height())) + "px'></>");
                        } else {
                            $("#" + ex).append("<img id=\"" + configID + "\" src='" + imgSrc + "' class='" + className + "' style='width:" + signWidth + "; height:" + signHeight + "; left: " + (event.pageX - $(left).width() - $leftMargin) + "px;top:" + (event.pageY - $offsetTop + $("#centerWar").scrollTop() - indexOfPage * ($("#" + ex).height() + 58.5) - filename * ($(".fileName").height() + $("br").height())) + "px'></>");
                        }
                    } else {
                        if (event.pageX > ($(left).width() + $("#" + ex).width() - $("#" + id).width() + $leftMargin) && event.pageX < ($(left).width() + $("#" + ex).width() + $leftMargin)) {
                            $("#" + ex).append("<img id=\"" + configID + "\" src='../images_2.0/" + id + ".png' class='smallDiv' style='left: " + ($("#" + ex).width() - $signPicW) + "px;top:" + (event.pageY - $offsetTop + $("#centerWar").scrollTop() - indexOfPage * ($("#" + ex).height() + 58.5) - filename * ($(".fileName").height() + $("br").height())) + "px'></div>");
                        } else {
                            $("#" + ex).append("<img id=\"" + configID + "\" src='../images_2.0/" + id + ".png' class='smallDiv' style='left: " + (event.pageX - $(left).width() - $leftMargin) + "px;top:" + (event.pageY - $offsetTop + $("#centerWar").scrollTop() - indexOfPage * ($("#" + ex).height() + 58.5) - filename * ($(".fileName").height() + $("br").height())) + "px'></div>");
                        }
                    }
                } else {//日期标签，判断图片边缘是否超过右侧
                    if (event.pageX > ($(left).width() + $("#" + ex).width() - $("#" + id).width() + $leftMargin) && event.pageX < ($(left).width() + $("#" + ex).width() + $leftMargin)) {
                        $("#" + ex).append("<img id=\"" + configID + "\" src='../images_2.0/" + id + ".png' class='smallDiv' style='left: " + ($("#" + ex).width() - $("#" + id).width()) + "px;top:" + (event.pageY - $offsetTop + $("#centerWar").scrollTop() - indexOfPage * ($("#" + ex).height() + 58.5) - filename * ($(".fileName").height() + $("br").height())) + "px'></div>");
                    } else {
                        $("#" + ex).append("<img id=\"" + configID + "\" src='../images_2.0/" + id + ".png' class='smallDiv' style='left: " + (event.pageX - $(left).width() - $leftMargin) + "px;top:" + (event.pageY - $offsetTop + $("#centerWar").scrollTop() - indexOfPage * ($("#" + ex).height() + 58.5) - filename * ($(".fileName").height() + $("br").height())) + "px'></div>");
                    }
                }

                var ids = $("#sealType").val();
                if (ids != "") {
                    var adaptWidth = $("#width").val();
                    var adaptHeight = $("#height").val();
                    var screenWidth = screen.width;
                    var adapt = screenWidth / 1440;
                    adaptWidth = adaptWidth * adapt;
                    adaptHeight = adaptHeight * adapt;
// 			   				$(".signFlag").css('width',adaptWidth);
// 							$(".signFlag").css('height',adaptHeight);
                    $("#" + configID).css('width', adaptWidth);
                    $("#" + configID).css('height', adaptHeight);
                }

                $("#" + id).hide();
                var signID = $("#signID").val();
                //page_1424075393842FH9Q1_1
                var pageID = $("#" + ex).attr("id");
                var docID = pageID.split("_")[1];
                var index = pageID.split("_")[2];

                //标识类型 1：签字/公章 2：日期
                var typeflag = id == "qianmingchu" ? 1 : 2;

                //ev.target.appendChild(document.getElementById(ID));
                //document.getElementById(ID).style.position='';

                //计算出鼠标的标签的位置
                //得到图片的top和left
                var flagx = $("#" + configID).attr("flagx");
                var flagy = $("#" + configID).attr("flagy");
                var x = event.clientX;
                var y = event.clientY;

                var obj = document.getElementById(pageID);
                var divx = obj.getBoundingClientRect().left;
                var divy = obj.getBoundingClientRect().top;

                var imgHeight = 0;

                if (typeflag == 1) {
                    imgHeight = 60;
                    $("#" + configID).attr("class", "signFlag");
                    var signType = $("#signType").val();
                    if (2 != signType) {
                        $("#" + configID).attr("ondblclick", "selectSignType('" + configID + "')");
                    }
                } else if (typeflag == 2) {
                    imgHeight = 32;
                }
                imgHeight = 0;

                //宽
                x = x - divx;
                //高
                y = y - divy;
                if (x < 0 || y < 0 || x > 650 || y > 1100) {
                    //showAlert("超出边界。请重试");
                    //$("#"+configID).remove();
                    //return;
                }
                //$("#"+configID).css("margin-left",x + "px");
                //$("#"+configID).css("margin-top",y + "px");
                $("#" + configID).attr("hasDrap", "1");
                $("#" + configID).attr("onclick", "showDeleteDiv('" + configID + "')");
                $("#" + configID).attr("onmouseout", "pageOnmouseout('" + configID + "')");
                $("#" + configID).attr("draggable", "true");
                $("#" + configID).attr("ondragstart", "drag(this,event," + typeflag + ")");
                $("#" + configID).attr("useremail", $("#userEmail").val());
                $("#" + configID).attr("type", typeflag);
                $("#" + configID).attr("typeflag", typeflag);
                $("#" + configID).attr("name", "configFlag");
                $("#" + configID).attr("configID", configID);

                $("#" + configID).attr("signID", signID);
                $("#" + configID).attr("docID", docID);
                $("#" + configID).attr("pageNo", index);
                $("#" + configID).css("position", "absolute");
                $("#" + configID).attr("signType", $("#currentSignType").val());
                var w = $(".page").width();
                var h = $(".page").height();
                x = x / w;
                y = y / h;
                var pagePdfWidth = $("#page_" + '6855614' + "_1").width();
                var pagePdfHeight = $("#page_" + '6855614' + "_1").height();
                var pageSealWidth = $("#" + configID).width();
                var pageSealHeight = $("#" + configID).height();
                if (x < 0 || y < 0 || (pageSealWidth / pagePdfWidth) + x > 1 || (pageSealHeight / pagePdfHeight) + y > 1) {
                    showAlert("超出范围，请重试");
                    removeConfig(configID);
                    return;
                }
                $("#" + configID).attr("x", x);
                $("#" + configID).attr("y", y);
                var signType = $("#signType").val();
                var toUser = $("#userEmail").val();

                //在页面上展示相应图片
// 	   					var signImgSrc = $("#signImgSrc").val();
// 	   					if(!signImgSrc){
                //单页签章选择
                if (typeflag == 1 && $("#currentSignType").val() == 1) {
                    selectSignType('configID');
                }else if($("#currentSignType").val() == 3){
                    //骑缝
                    showFancyboxBlockUI();
                    $("#select-staple").show();

                }else if($("#currentSignType").val() == 4){
                    //关键字
                }
// 	   					}else{
// 	   						$(".signFlag").attr("src",signImgSrc);
// 	   					}
            }

            $(".smallDiv").mouseup(function () {
                var $container = $("#" + ex);
                var $this = $(this);

                /* if(parseInt($this.offset().top) > $container.height()-$this.height() && $this.offset().left > ($container.width()+$(left).width()-$this.width())){
                 $this.animate({left:$container.width() - $this.width() + "px",top:$container.height() - $this.height() + "px"},300)
                 }else if(parseInt($this.offset().top) > $container.height()-$this.height() && $this.offset().left < ($container.width()+$(left).width()-$this.width())){
                 $this.animate({left:0,top:$container.height() - $this.height() + "px"},300)
                 }else */
                if ($this.offset().left - $leftMargin < $(left).width()) {
                    $this.animate({left: "0px"}, 300)
                } else if ($this.offset().top < $container.offset().top) {
                    $this.animate({top: "0px"}, 300)
                } else if ($this.offset().left > ($container.width() + $(left).width() - $this.width())) {
                    $this.animate({left: $container.width() - $this.width() + "px"}, 300)
                } else if (parseInt($this.offset().top) > $container.height() - $this.height()) {
                    $this.animate({top: $container.height() - $this.height() + "px"}, 300)
                }
            })

            //判断跟随的图片，生成相应的label
            if ($("#qianmingchu").css("display") == "block") {
                if ($(".signFlag[signtype=1]").length >= 9) {
                    $("#qmImg").addClass("lock-option");
                }
                createLabel("qianmingchu");
            } else if ($("#riqi").css("display") == "block") {
                $("#rqImg").hide();
                createLabel("riqi");
            }

        }


        /* signature  */
        conPosition("draw");
        $('#sig').signature();
        $('#clear').click(function () {
            $('#sig').signature('clear');
        });
        $("#revocation").click(function () {
            $("#background, #content_sign").hide();
            $('#sig').signature();
        })
        $("#pen_size li").click(function () {
            $("#pen_size li").removeClass("selected");
            $(this).addClass("selected");
            if ($(this).attr("id") == "showPant1") {
                $('#sig').signature({thickness: 5});
            } else if ($(this).attr("id") == "showPant2") {
                $('#sig').signature({thickness: 9});
            } else {
                $('#sig').signature({thickness: 13});
            }
        })

        start();
        /* bubble show */
        $(".bubble").mouseover(function () {
            $(this).prev().children(".bubble_show ").show();
        }).mouseout(function () {
            $(this).prev().children(".bubble_show ").hide();
        })

        $("#centerWar").scroll(function () {
            $(".page").each(function () {
                if ($("#centerWar").height() > $(this).offset().top) {
                    var rightID = $(this).attr("name");
                    var arr = rightID.split("_");
                    var dodID = arr[1];
                    var pageNo = parseInt(arr[3]);
                    if (pageNo % 5 == 1) {
                        var loadPage = sessionStorage.getItem('6855614');
                        if (pageNo > loadPage) {
                            sessionStorage.setItem('6855614', pageNo);
                            var pageCount = $("#pageNum").text();
                            if (pageCount > 1) {
                                if (pageNo + 5 > pageCount) {
                                    createPage((pageNo + 1) + "-" + pageCount);
                                } else {
                                    createPage((pageNo + 1) + "-" + (pageNo + 5));
                                }
                            }
                        }
                    }

                    showOrHide("rightPage_" + dodID);
                    document.getElementById(rightID).scrollIntoView();
                }
            });
        });

        $("#fileScroll_1").scroll(function () {
            $(".rightPage").each(function (index) {
                if ($("#fileScroll_1").height() > $(this).offset().top) {
                    var rightID = $(this).attr("id");
                    var arr = rightID.split("_");
                    var dodID = arr[1];
                    var pageNo = parseInt(arr[2]);
                    if (pageNo % 5 == 1 && $(".rightPage").length == pageNo) {
                        setClass('6855614' + '_' + pageNo);
                        //document.getElementById('centerPage_' + '6855614' + '_' + pageNo).scrollIntoView();
                        return false;
                    }
                }
            });
        });


        $(document).bind("mousedrag",function(event){
            if ($("#qianmingchu").attr("src") == $("#signImgSrc").val()) {
                var signType = $("#signType").val();
                if (2 == signType) {
                    $("#qianmingchu").css({"width": "149px", "height": "129px"});
                } else {
                    $("#qianmingchu").css({"width": "129px", "height": "40px"});
                }
                $("#qianmingchu").css({"width": "64px", "height": "64px"});
            } else {
                $("#qianmingchu").css({"width": "64px", "height": "64px"});
            }
            $("#" + id).show().css({"left": (e.pageX + 2), "top": (e.pageY - $(document).scrollTop())});
        })
        $("#qmImg").bind("mousedown",function(){

        })
    });

    function setClass(index) {
        $(".rightPage").removeClass("on");
        $("#rightPage_" + index).addClass("on");

        $(".tits").removeClass("leftIconPosition");
        $("#rightPage_" + index).find(".tits").addClass("leftIconPosition");
    }

    $(window).resize(function () {
        start();
    });

    function start() {
        $("#background").hide();
        $("#progressBar1").hide();
        var wh = $(window).height();
        var ww = $(window).width();
        $("#wardiv").css("height", wh - 215);
        $("#leftfl").css("height", wh - 215);
        var signType = $("#signType").val();
        var t = document.documentElement.clientHeight;
        var oContent = document.getElementById("footer");
        oContent.style.top = t - 40 + "px";
        $(".page").css("width", ww * 0.6 * 0.95 + "px");
        divPageWidth = ww * 0.6 * 0.95;
        divPageHeight = ww * 0.6 * 0.95 * 1.48;

        var h = ww * 0.6 * 0.95 * 1.48;

        $(".page").each(function (i) {
            $(this).css("height", h + "px");
        });

        $(".fileScroll").css("height", t - 165);
        $(".left").css("height", t - 85);
        $(".main").css("height", t - 85);
        $(".right").css("height", t - 85);

        $("img.smimage").lazyload();

        var pageWarHeight = $("#centerWar")[0].scrollHeight;
        var rightPageHeight = $(".rightPageList")[0].scrollHeight;
        var rightHeight = $(".rightPageList").scrollTop();
        var pageHeight = h + $(".c_page_no").height();
        var len = $(".page").length;
        //每页相对于滚动条高度
        var perScrollTop = pageWarHeight / len;
        var rightScrollTop = rightPageHeight / len;
    }

    var imgFlag = false; //鼠标放在图片上标记
    var divFlag = false; //鼠标放在删除层上标记

    function showDeleteDiv(configID) {
        if ($("#" + configID + "_divX").length == 0) {
            var docID = $("#" + configID).attr("docID");
            var pageNo = $("#" + configID).attr("pageNo");
            var imgObj = document.createElement('img');
            imgObj.src = "../images_2.0/gb.png";
            imgObj.setAttribute("class", "divX");
            imgObj.setAttribute("id", configID + "_divX");
            imgObj.setAttribute("onclick", "removeConfig('" + configID + "')");
            imgObj.setAttribute("onmouseover", "divOnmouseover('" + configID + "')");
            imgObj.style.position = "absolute";
            imgObj.style.marginLeft = document.getElementById(configID).offsetLeft + $("#" + configID).width() + "px";
            imgObj.style.marginTop = document.getElementById(configID).offsetTop - 15 + "px";
            imgObj.style.width = "20px";
            imgObj.style.height = "20px";
            document.getElementById("page_" + docID + "_" + pageNo).appendChild(imgObj);

        }
    }
    ;

    function hideDeleteDiv(configID) {
        $("#" + configID + "_divX").remove();
    }
    ;

    function pageOnmouseout(configID) {
        setTimeout("hideDeleteDiv('" + configID + "')", 5000)
    }
    ;

    function divOnmouseover(configID) {
        showDeleteDiv(configID);
    }
    ;

    function removeConfig(configID) {
        var signID = $("#" + configID).attr("signID");
        var docID = $("#" + configID).attr("docID");
        var typeflag = $("#" + configID).attr("typeflag");
        if (typeflag == 1) {
            $("#qmImg").removeClass("lock-option");
        } else {
            $("#rqImg").show();
        }
        if($("#" + configID).attr("signType") == 3){
            $("#stapleImg").removeClass("lock-option");
        }

        $("#" + configID + "_divX").remove();
        $("#" + configID).remove();

        var someOne = sealArray[configID];
        if (someOne["sealId"] == "") {
            $("#sealCount").val(parseInt($("#sealCount").val()) - 1);
        }
        sealArray.splice(configID, 1);
    }

    function sign() {
        var FLAG = false;
        var password = $("#password").val();
        var time = sessionStorage.getItem( 'zjjr56@qq.com');
        var rand = $("#rand").val();
        if (password == "" || (time >= 3 && rand == "")) {
            return;
        }
        closeInput();
        if (UKEY_CERT == "" || UKEY_CERT == undefined) {
            showblockUI();
            password =  hex_md5(password);
            var post = "signPwd=" + password + "&edit" + (new Date()).toString();
            $.TsignAjax({
                url: 'account!validatePwd.xml',
                async: false,
                data:post,
                success:function(jsonData){
                    FLAG = true;
                },
                err:function(jsonData){
                    var errCode = jsonData["errCode"];
                    if (errCode == 1023) {
                        var account = 'zjjr56@qq.com';
                        var time = sessionStorage.getItem(account);
                        if (time == null) {
                            sessionStorage.setItem(account, 1);
                        } else {
                            sessionStorage.setItem(account, parseInt(time) + 1);
                        }
                        $("#password").val("");
                    } else if (errCode == 1) {
                        $("#rand").val("");
                    }
                    closeAlert();
                    var errShow = new Boolean(jsonData["errShow"]);
                    if (errShow == true) {
                        showAlert(jsonData["msg"]);
                    } else {
                        showAlert("系统出错，请稍后重试");
                    }
                }
            })
/*            $.ajax({
                url: 'account!validatePwd.xml',
                type: 'POST',
                data: post,
                dataType: 'xml',
                async: false,
                timeout: 30000,
                error: function () {
                    closeAlert();
                },
                success: function (data) {

                    var result = $(data).find("result >resultMsg").text();
                    if (result == null || result == "") {
                        closeAlert();
                        showAlert("系统出错，请稍后重试");
                        return;
                    }
                    var jsonData = JSON.parse(result);
                    var errCode = jsonData["errCode"];
                    if (errCode > 0) {
                        if (errCode == 1023) {
                            var account = 'zjjr56@qq.com';
                            var time = sessionStorage.getItem(account);
                            if (time == null) {
                                sessionStorage.setItem(account, 1);
                            } else {
                                sessionStorage.setItem(account, parseInt(time) + 1);
                            }
                            $("#password").val("");
                        } else if (errCode == 1) {
                            $("#rand").val("");
                        }
                        closeAlert();
                        var errShow = new Boolean(jsonData["errShow"]);
                        if (errShow == true) {
                            showAlert(jsonData["msg"]);
                        } else {
                            showAlert("系统出错，请稍后重试");
                        }
                        return;
                    }else{

                    }
                }
            });*/
        }else{
            if(!SignCtrl.testUkeyCtrl(UKEY_CERT)){
            }else if(UkeyCtrl.VerifyCertPin(UKEY_CERT,password) == 0){
                showAlert("密码错误");
            }else{
                FLAG = true;
            }
        }
        if (!FLAG) {
            return;
        }
        var pdfWidth = $("#pdfWidth").val();
        var pdfHeight = $("#pdfHeight").val();
        var signArray = new Array();
        $(".signFlag").each(function (index) {

            if ($("#type").val() == 1) {
                sealStyle = 3;
            } else {
                if ($("#fonttype2").hasClass("selected")) {
                    sealStyle = 15;
                } else {
                    sealStyle = 9;
                }
            }
            var signJson = sealArray[$(this).attr("id")];
            var sealWidth = $(this).attr("objwidth") * 0.78 / 2;
            var sealHeight = $(this).attr("objheight") * 0.78 / 2;
            signJson["posPage"] = $(this).attr("pageNo");
            if($(this).attr("signtype") == 3){
                signJson["posPage"] = $(this).attr("pospage");
            }
            signJson["posX"] = pdfWidth * ($(this).attr("x") - 0.00200) + sealWidth;
            signJson["posY"] = pdfHeight - (pdfHeight * ($(this).attr("y") - 0.00317) + sealHeight);
            if (signJson.type == null || signJson.type == undefined || signJson.type == '') {
                signJson["type"] = sealStyle;
            }
            signArray[index] = signJson;
        });
        var signInfo = JSON.stringify(signArray);
        var signData = {};


        //多章添加
        showblockUI();
        var postData = "signInfo=" + signInfo + "&edit=" + (new Date()).valueOf();
        $.ajax({
            url: "sign!multiSign.xml",
            type: "POST",
            data: postData,
            dataType: "xml",
            async: false,
            timeout: 300000,
            error: function (XMLHttpRequest, textStatus, errorThrown) {
//                console.log(errorThrown);
            },
            success: function (data) {
                closeAlert();
                var result = $(data).find("result >resultMsg").text();
                if (result == null || result == "") {
                    showAlert("系统出错，请稍后重试");
                    FLAG = false;
                    return;
                }
                var jsonData = JSON.parse(result);
                var errCode = jsonData["errCode"];
                if (errCode > 0) {
                    var errShow = new Boolean(jsonData["errShow"]);
                    if (errShow == true) {
                        showAlert(jsonData["msg"]);
                    } else {
                        showAlert("系统出错，请稍后重试");
                    }
                    FLAG = false;
                    return;
                } else {

                    signData = jsonData;
                    FLAG = true;
                }
            }
        });


        if (!FLAG) {
            return;
        }
        //单页：1、骑缝：3、关键字：4
        var newJson = new Array();
        var signers = [];
        var signType = 1;
        for (var i = 0; i < signData.length; i++) {
            var one = {};
            one["sealId"] = signData[i]["sealId"];
            one["posX"] = signData[i]["posX"];
            one["posY"] = signData[i]["posY"];
            one["posPage"] = signData[i]["posPage"];
            one["signType"] = signData[i]["signType"];
            signType = signData[i]["signType"];
            newJson[i] = one;
        }
        signInfo = JSON.stringify(newJson);
        showblockUI();
        var postData = "signdocId=" + '6855614' + "&signInfo=" + signInfo + "&password=" + password + "&signType=" + signType + "&posType=" + 0 + "&rand=" + rand + "&edit=" + (new Date()).valueOf();
        if (UKEY_CERT != "" && UKEY_CERT != undefined) {
            SignCtrl.sign("../rest/", postData, UKEY_CERT,
                    {
                        notifyType: "UkeySignCommon",
                        error: function () {
                        },
                        success: function (data) {
                            closeAlert();
                            //var json = checkStream($(data).find("result >resultMsg").text());
                            checkResult(
                                    {
                                        json: data,
                                        parseError: function () {
                                            showAlert("数据解析异常");
                                        },
                                        error: function (code, msg) {
                                            showAlert("系统异常(" + code + ")");
                                        },
                                        success: function (obj) {
                                            //签署完毕,保存签署日志
                                            if (!saveSignLog('6855614', newJson[0].sealId, obj.urls[0], obj.hash, obj.signature)) {
                                                return;
                                            }

                                            returnSuccess(obj);
                                        }
                                    });
                        }
                    });
            return;
            /*            Signer.submit(signers, {
             cert: UKEY_CERT,
             password: {
             raw:password,
             md5: hex_md5(password)
             },
             progress: function (ctx, failure) {
             },
             complete: function (failures) {
             returnSuccess(failures);
             }
             });
             return;*/
        }

        $.ajax({
            url: "sign!pdfSign.xml",
            type: "POST",
            data: postData,
            dataType: "xml",
            timeout: 300000,
            success: function (data) {
                closeAlert();
                var result = $(data).find("result >resultMsg").text();
                if (result == null || result == "") {
                    showAlert("系统出错，请稍后重试");
                    return;
                }
                var jsonData = JSON.parse(result);
                returnSuccess(jsonData);
            }
        });

        function returnSuccess(jsonData) {
            var errCode = jsonData["errCode"];
            if (errCode > 0) {
                if ((errCode == 10001 || errCode == 10002)) {
                    if (0 == 0 && 'owner' != 'owner'
                )
                    {
                        showAlert("此文件签署由发起人(" + '' + ")承担签署费用，因发起人(" + '' + ")中的签署次数不足，请联系(" + '' + ")进行签署次数充值后再继续签署");
                    }
                else
                    {
                        showEventChoose("您账户中的签署次数已经用完，请先充值签署次数后再签署", "recharge()");
                    }
                } else {
                    var errShow = new Boolean(jsonData["errShow"]);
                    if (errShow == true) {
                        showAlert(jsonData["msg"]);
                    } else {
                        showAlert("系统出错，请稍后重试");
                    }
                }
                return;
            } else {
                if ('owner' == 'owner') {
                    send('6855614', $("#payType").val());
                } else {
                    showUrlMust("您已成功完成签署", "doc!page?skip=doclist-view-batch&type=" +5);
                }

                var account = 'zjjr56@qq.com';
                sessionStorage.setItem(account, 0);
            }
        }

        recharge = function () {
            var billUrl = 'https://bs.tsign.cn:8443/billingsystem/app/page/manage.html#sign-package';
            window.open(billUrl);
        }

    }


    function changeImg(type, flag, obj) {
        if (flag == 0) {
            if (1 == type) {
                obj.src = "../images_2.0/sign.png";
            }
            else if (2 == type) {
                obj.src = "../images_2.0/date.png";
            } else if (3 == type) {
                obj.src = "../images_2.0/office.png";
            } else if (4 == type) {
                obj.src = "../images_2.0/company.png";
            } else if (5 == type) {
                obj.src = "../images_2.0/seal.png";
            }
        } else if (flag == 1) {
            if (1 == type) {
                obj.src = "../images_2.0/sign_move.png";
            }
            else if (2 == type) {
                obj.src = "../images_2.0/date_move.png";
            } else if (3 == type) {
                obj.src = "../images_2.0/office_move.png";
            } else if (4 == type) {
                obj.src = "../images_2.0/company_move.png";
            } else if (5 == type) {
            }
        } else if (flag == 2) {
            if (1 == type) {
                obj.src = "../images_2.0/sign_on.png";
            }
            else if (2 == type) {
                obj.src = "../images_2.0/date_on.png";
            } else if (3 == type) {
                obj.src = "../images_2.0/office_on.png";
            } else if (4 == type) {
                obj.src = "../images_2.0/company_on.png";
            } else if (5 == type) {
                obj.src = "../images_2.0/seal_on.png";
            }
        }
    }

    function selectSignType(thisOne) {
        $('#sig').signature();
        var userEmail = $("#userEmail").val();
        $("#onlineChange").val("");
        if (thisOne != 'configID') {
            $("#onlineChange").val(thisOne);
            $("#currentSignType").val(sealArray[thisOne].signType);
            $("#onlineSeal").attr("signtype", sealArray[thisOne].signType);
        }
        if ($(".signFlag").length > 1) {
            conPosition("content_sign");
            if ($("#sign_cont_04").css("display") == "block") {
                return;
            }
            $("#onlineSeal").attr("sealId", "");
            $("#onlineSeal").attr("templateName", "");
            $("#onlineSeal").attr("sealWay", "");
            $("#onlineSeal").attr("rune", "");
            $("#onlineSeal").attr("typeName", "");
            $("#onlineSeal").attr("key", "");
            if ($("#sign_cont_05").css("display") == "block") {
                refreshCode();
            }
            if ($("#sign_cont_02").css("display") == "block") {
                $(".nav_li_001 li").eq(1).click();
            }
            return;
        }
        $("#onlineSeal").attr("sealId", "");
        $("#onlineSeal").attr("templateName", "");
        $("#onlineSeal").attr("sealWay", "");
        $("#onlineSeal").attr("rune", "");
        $("#onlineSeal").attr("typeName", "");
        $("#onlineSeal").attr("key", "");
        alertview();

    }
    function alertview() {
        var userEmail = $("#userEmail").val();
        conPosition("content_sign");
        var postData = "isDefault=" + 0 + "&edit=" + (new Date()).valueOf();
        $.ajax({
            url: "seal!getSeals.xml",
            type: "post",
            data: postData,
            dataType: "xml",
            timeout: 300000,
            success: function (data) {
                var result = $(data).find("result >resultMsg").text();
                if (result == null || result == "") {
                    $("#default").hide();
                    return;
                }
                var jsonData = JSON.parse(result);
                var errCode = jsonData["errCode"];
                if (errCode > 0) {
                    if (false) {
                        showSignFont($(".nav_li_001 li").eq(3), 4)
                    } else {
                        showSignFont($(".nav_li_001 li").eq(2), 4)
                    }
                    return;
                } else {
                    sealCompare.sealArray = jsonData["msg"];
                    showSignFont($(".nav_li_001 li").eq(0), 1);
                }
            }
        });
    }

    var sealCompare = {
        _sealArray: [],
        set sealArray(arr) {
            this._sealArray = arr;
        },
        compare: function (templateName) {
            var seal = "";
            for (var i = 0; i < this._sealArray.length; i++) {
                var one = this._sealArray[i];
                var flag = one["status"] == 1 && one["sealWay"] == 1 && one["templateName"] == templateName;
                if (2 == 1
            )
                {
                    if (flag) {
                        seal = one;
                        break;
                    }
                }
                if (2 == 2
            )
                {
                    if (flag && one["hText"] == $("#typeName").val() && one["qText"] == $("#rune").val()) {
                        seal = one;
                        break;
                    }
                }
            }
            return seal;
        },
    }

    //保存签署日志,目前UKEY签署只支持单印章
    function saveSignLog(docId, sealId, key, hash, signature) {
        var flag = true;
        var data =
        {
            signdocId: docId,
            sealId: sealId,
            signedDockey: key,
            hash: hash,
            signature: signature
        };

        $.ajax({
            url: "../rest/quick-ukey!saveSignLog.xml",
            type: "post",
            data: data,
            dataType: "xml",
            timeout: 300000,
            async: false,
            error: function () {
                //保存签署日志失败
            },
            success: function (data) {
                var result = $(data).find("result").text();
                var jsonData = JSON.parse(result);
                var errCode = jsonData["errCode"];
                if (errCode > 0) {
                    closeAlert();
                    var errShow = new Boolean(jsonData["errShow"]);
                    if (errShow == true) {
                        showAlert(jsonData["msg"]);
                    } else {
                        showAlert("系统出错，请稍后重试");
                    }
                    flag = false;
                }
            }
        });
        return flag;
    }
</script>



	
<script type="text/javascript" src="../../../js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../../../js/seajs/sea.js"></script>
<script type="text/javascript" src="../../../js/seajs/seajs-text.js"></script>
<script type="text/javascript" src="../../../js/seajs/seajs-css.js"></script>
<script type="text/javascript" src="../../../js/enterprise/config.js"></script>
</body>
<script type="text/javascript">
	seajs.use('./esign', function(esign) {
		esign.init();
	});
</script>
</html>